You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Next and V10 documentation for built-in component and trait types
- Changed title from "Built-in ParsedComponents Type" to "Built-in Components Type" for clarity.
- Improved formatting for parameter tables across various components and traits.
- Added new sections for `podsecuritycontext` and `securitycontext` traits, including examples and specifications.
- Added new sections for `statefulset` components, including examples and specifications.
- Corrected descriptions and formatting inconsistencies in existing documentation.
These changes enhance the clarity and usability of the documentation for end users.
Signed-off-by: jguionnet <jguionnet@guidewire.com>
Copy file name to clipboardExpand all lines: docs/end-user/traits/references.md
+175-6Lines changed: 175 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: Built-in Trait Type
4
4
5
5
This documentation will walk through all the built-in trait types sorted alphabetically.
6
6
7
-
> It was generated automatically by [scripts](../../contributor/cli-ref-doc.md), please don't update manually, last updated at 2023-07-28T09:33:26+08:00.
7
+
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2025-10-18T02:43:12Z.
8
8
9
9
## Affinity
10
10
@@ -365,7 +365,7 @@ spec:
365
365
366
366
### Description
367
367
368
-
Add annotations on your workload. if it generates pod, add same annotations for generated pods.
368
+
Add annotations on your workload. If it generates pod or job, add same annotations for generated pods.
369
369
370
370
### Apply To Component Types
371
371
@@ -585,7 +585,7 @@ Component based on the following kinds of resources:
585
585
### Examples (container-ports)
586
586
587
587
It's used to define Pod networks directly. hostPort routes the container's port directly to the port on the scheduled node, so that you can access the Pod through the host's IP plus hostPort.
588
-
Don't specify a hostPort for a Pod unless it is absolutely necessary(run `DaemonSet` service). When you bind a Pod to a hostPort, it limits the number of places the Pod can be scheduled, because each `<hostIP, hostPort, protocol>` combination must be unique. If you don't specify the hostIP and protocol explicitly, Kubernetes will use 0.0.0.0 as the default hostIP and TCP as the default protocol.
588
+
Don't specify a hostPort for a Pod unless it is absolutely necessary(run `DaemonSet` service). When you bind a Pod to a hostPort, it limits the number of places the Pod can be scheduled, because each `<hostIP, hostPort, protocol>` combination must be unique. If you don't specify the hostIP and protocol explicitly, Kubernetes will use 0.0.0.0 as the default hostIP and TCP as the default protocol.
589
589
If you explicitly need to expose a Pod's port on the node, consider using `expose` or `gateway` trait, or exposeType and ports parameter of `webservice` component before resorting to `container-ports` trait.
590
590
```yaml
591
591
apiVersion: core.oam.dev/v1beta1
@@ -935,6 +935,9 @@ spec:
935
935
gatewayHost | Specify the host of the ingress gateway, which is used to generate the endpoints when the host is empty. | string | false |
936
936
name | Specify a unique name for this gateway, required to support multiple gateway traits on a component. | string | false |
937
937
pathType | Specify a pathType for the ingress rules, defaults to "ImplementationSpecific". | "ImplementationSpecific" or "Prefix" or "Exact" | false | ImplementationSpecific
938
+
annotations | Specify the annotations to be added to the ingress. | map[string]string | false |
939
+
labels | Specify the labels to be added to the ingress. | map[string]string | false |
940
+
existingServiceName | If specified, use an existing Service rather than creating one. | string | false |
938
941
939
942
940
943
## Hostalias
@@ -1817,6 +1820,78 @@ spec:
1817
1820
cpu | | string | false | 0.5
1818
1821
1819
1822
1823
+
## Podsecuritycontext
1824
+
1825
+
### Description
1826
+
1827
+
Adds security context to the pod spec in path 'spec.template.spec.securityContext'.
1828
+
1829
+
### Apply To Component Types
1830
+
1831
+
Component based on the following kinds of resources:
1832
+
- deployments.apps
1833
+
- statefulsets.apps
1834
+
- daemonsets.apps
1835
+
- jobs.batch
1836
+
1837
+
1838
+
1839
+
### Examples (podsecuritycontext)
1840
+
1841
+
```yaml
1842
+
apiVersion: core.oam.dev/v1beta1
1843
+
kind: Application
1844
+
metadata:
1845
+
name: podtato-head
1846
+
spec:
1847
+
components:
1848
+
- name: podtato-head-frontend
1849
+
type: webservice
1850
+
properties:
1851
+
image: ghcr.io/podtato-head/podtato-server:v0.3.1
1852
+
ports:
1853
+
- port: 8080
1854
+
expose: true
1855
+
cpu: "0.1"
1856
+
memory: "32Mi"
1857
+
traits:
1858
+
- type: podsecuritycontext
1859
+
properties:
1860
+
# runs pod as non-root user
1861
+
runAsNonRoot: true
1862
+
# runs the pod as user with uid 65532
1863
+
runAsUser: 65532
1864
+
```
1865
+
1866
+
### Specification (podsecuritycontext)
1867
+
1868
+
1869
+
Name | Description | Type | Required | Default
1870
+
---- | ----------- | ---- | -------- | -------
1871
+
appArmorProfile | Specify the AppArmor profile for the pod. | [appArmorProfile](#apparmorprofile-podsecuritycontext) | false |
1872
+
fsGroup | | int | false |
1873
+
runAsGroup | | int | false |
1874
+
runAsUser | Specify the UID to run the entrypoint of the container process. | int | false |
1875
+
runAsNonRoot | Specify if the container runs as a non-root user. | bool | false | true
1876
+
seccompProfile | Specify the seccomp profile for the pod. | [seccompProfile](#seccompprofile-podsecuritycontext) | false |
1877
+
1878
+
1879
+
#### appArmorProfile (podsecuritycontext)
1880
+
1881
+
Name | Description | Type | Required | Default
1882
+
---- | ----------- | ---- | -------- | -------
1883
+
type | | "RuntimeDefault" or "Unconfined" or "Localhost" | true |
1884
+
localhostProfile | | string | false |
1885
+
1886
+
1887
+
#### seccompProfile (podsecuritycontext)
1888
+
1889
+
Name | Description | Type | Required | Default
1890
+
---- | ----------- | ---- | -------- | -------
1891
+
type | | "RuntimeDefault" or "Unconfined" or "Localhost" | true |
1892
+
localhostProfile | | string | false |
1893
+
1894
+
1820
1895
## Resource
1821
1896
1822
1897
### Description
@@ -1830,6 +1905,7 @@ Component based on the following kinds of resources:
1830
1905
- statefulsets.apps
1831
1906
- daemonsets.apps
1832
1907
- jobs.batch
1908
+
- cronjobs.batch
1833
1909
1834
1910
1835
1911
@@ -1940,6 +2016,99 @@ spec:
1940
2016
replicas | Specify the number of workload. | int | false | 1
1941
2017
1942
2018
2019
+
## Securitycontext
2020
+
2021
+
### Description
2022
+
2023
+
Adds security context to the container spec in path 'spec.template.spec.containers.[].securityContext'.
2024
+
2025
+
### Apply To Component Types
2026
+
2027
+
Component based on the following kinds of resources:
2028
+
- deployments.apps
2029
+
- statefulsets.apps
2030
+
- daemonsets.apps
2031
+
- jobs.batch
2032
+
2033
+
2034
+
2035
+
### Examples (securitycontext)
2036
+
2037
+
```yaml
2038
+
apiVersion: core.oam.dev/v1beta1
2039
+
kind: Application
2040
+
metadata:
2041
+
name: podtato-head
2042
+
spec:
2043
+
components:
2044
+
- name: podtato-head-frontend
2045
+
type: webservice
2046
+
properties:
2047
+
image: ghcr.io/podtato-head/podtato-server:v0.3.1
2048
+
ports:
2049
+
- port: 8080
2050
+
expose: true
2051
+
cpu: "0.1"
2052
+
memory: "32Mi"
2053
+
traits:
2054
+
- type: securitycontext
2055
+
properties:
2056
+
# drops all capabilities
2057
+
dropCapabilities:
2058
+
- ALL
2059
+
# runs container as non-root user
2060
+
runAsNonRoot: true
2061
+
# ensures that the container runs unprivileged
2062
+
privileged: false
2063
+
# runs container in read-only mode
2064
+
readOnlyRootFilesystem: false
2065
+
```
2066
+
2067
+
### Specification (securitycontext)
2068
+
2069
+
2070
+
Name | Description | Type | Required | Default
2071
+
---- | ----------- | ---- | -------- | -------
2072
+
| | [PatchParams](#patchparams-securitycontext) or [type-option-2](#type-option-2-securitycontext) | false |
2073
+
2074
+
2075
+
#### PatchParams (securitycontext)
2076
+
2077
+
Name | Description | Type | Required | Default
2078
+
---- | ----------- | ---- | -------- | -------
2079
+
containerName | Specify the name of the target container, if not set, use the component name. | string | false | empty
2080
+
addCapabilities | | []string | false |
2081
+
allowPrivilegeEscalation | | bool | false | false
2082
+
dropCapabilities | | []string | false |
2083
+
privileged | | bool | false | false
2084
+
readOnlyRootFilesystem | | bool | false | false
2085
+
runAsNonRoot | | bool | false | true
2086
+
runAsUser | | int | false |
2087
+
runAsGroup | | int | false |
2088
+
2089
+
2090
+
#### type-option-2 (securitycontext)
2091
+
2092
+
Name | Description | Type | Required | Default
2093
+
---- | ----------- | ---- | -------- | -------
2094
+
containers | Specify the container image for multiple containers. | [[]containers](#containers-securitycontext) | true |
2095
+
2096
+
2097
+
##### containers (securitycontext)
2098
+
2099
+
Name | Description | Type | Required | Default
2100
+
---- | ----------- | ---- | -------- | -------
2101
+
containerName | Specify the name of the target container, if not set, use the component name. | string | false | empty
2102
+
addCapabilities | | []string | false |
2103
+
allowPrivilegeEscalation | | bool | false | false
2104
+
dropCapabilities | | []string | false |
2105
+
privileged | | bool | false | false
2106
+
readOnlyRootFilesystem | | bool | false | false
2107
+
runAsNonRoot | | bool | false | true
2108
+
runAsUser | | int | false |
2109
+
runAsGroup | | int | false |
2110
+
2111
+
1943
2112
## Service-Account
1944
2113
1945
2114
### Description
@@ -2376,7 +2545,7 @@ spec:
2376
2545
properties:
2377
2546
containerName: "busybox-runner"
2378
2547
httpGet:
2379
-
host: "www.guidewire.com"
2548
+
host: "www.guidewire.comm"
2380
2549
scheme: "HTTPS"
2381
2550
port: 443
2382
2551
periodSeconds: 4
@@ -2456,7 +2625,7 @@ spec:
2456
2625
2457
2626
Name | Description | Type | Required | Default
2458
2627
---- | ----------- | ---- | -------- | -------
2459
-
port | Number or name of the port to access on the container. | string | true |
2628
+
port | Number or name of the port to access on the container. | int | true |
2460
2629
host | Host name to connect to, defaults to the pod IP. | string | false |
2461
2630
2462
2631
@@ -2522,7 +2691,7 @@ spec:
2522
2691
2523
2692
Name | Description | Type | Required | Default
2524
2693
---- | ----------- | ---- | -------- | -------
2525
-
port | Number or name of the port to access on the container. | string | true |
2694
+
port | Number or name of the port to access on the container. | int | true |
2526
2695
host | Host name to connect to, defaults to the pod IP. | string | false |
0 commit comments