Skip to content

Commit 685073e

Browse files
committed
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>
1 parent 80cbd43 commit 685073e

File tree

8 files changed

+1548
-110
lines changed

8 files changed

+1548
-110
lines changed

docs/end-user/components/references.md

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Built-in ParsedComponents Type
2+
title: Built-in Components Type
33
---
44

55
This documentation will walk through all the built-in component types sorted alphabetically.
66

7-
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2024-10-10T15:56:12-07:00.
7+
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2025-10-18T02:39:31Z.
88
99
## Cron-Task
1010

@@ -292,10 +292,6 @@ spec:
292292

293293
Describes daemonset services in Kubernetes.
294294

295-
### Underlying Kubernetes Resources (daemon)
296-
297-
- daemonsets.apps
298-
299295
### Examples (daemon)
300296

301297
```yaml
@@ -639,20 +635,16 @@ spec:
639635
```
640636

641637
### Specification (k8s-objects)
642-
| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT |
643-
|---------|-------------|-----------------------|----------|---------|
644-
| objects | A slice of Kubernetes resource manifests | [][Kubernetes-Objects](https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/) | true | |
638+
Name | Description | Type | Required | Default
639+
---- | ----------- | ---- | -------- | -------
640+
objects | A slice of Kubernetes resource manifests | [][Kubernetes-Objects](https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/) | true |
645641

646642
## Statefulset
647643

648644
### Description
649645

650646
Describes long-running, scalable, containerized services used to manage stateful application, like database.
651647

652-
### Underlying Kubernetes Resources (statefulset)
653-
654-
- statefulsets.apps
655-
656648
### Examples (statefulset)
657649

658650
```yaml
@@ -965,10 +957,6 @@ spec:
965957

966958
Describes jobs that run code or a script to completion.
967959

968-
### Underlying Kubernetes Resources (task)
969-
970-
- jobs.batch
971-
972960
### Examples (task)
973961

974962
```yaml
@@ -1146,10 +1134,6 @@ spec:
11461134

11471135
Describes long-running, scalable, containerized services that have a stable network endpoint to receive external network traffic from customers.
11481136

1149-
### Underlying Kubernetes Resources (webservice)
1150-
1151-
- deployments.apps
1152-
11531137
### Examples (webservice)
11541138

11551139
```yaml
@@ -1194,6 +1178,7 @@ spec:
11941178
env | Define arguments by using environment variables. | [[]env](#env-webservice) | false |
11951179
cpu | Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core). | string | false |
11961180
memory | Specifies the attributes of the memory resource required for the container. | string | false |
1181+
limit | | [limit](#limit-webservice) | false |
11971182
volumeMounts | | [volumeMounts](#volumemounts-webservice) | false |
11981183
volumes | Deprecated field, use volumeMounts instead. | [[]volumes](#volumes-webservice) | false |
11991184
livenessProbe | Instructions for assessing whether the container is alive. | [livenessProbe](#livenessprobe-webservice) | false |
@@ -1246,6 +1231,14 @@ spec:
12461231
key | The key of the config map to select from. Must be a valid secret key. | string | true |
12471232

12481233

1234+
#### limit (webservice)
1235+
1236+
Name | Description | Type | Required | Default
1237+
---- | ----------- | ---- | -------- | -------
1238+
cpu | | string | false |
1239+
memory | | string | false |
1240+
1241+
12491242
#### volumeMounts (webservice)
12501243

12511244
Name | Description | Type | Required | Default

docs/end-user/traits/references.md

Lines changed: 175 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Built-in Trait Type
44

55
This documentation will walk through all the built-in trait types sorted alphabetically.
66

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.
88
99
## Affinity
1010

@@ -365,7 +365,7 @@ spec:
365365
366366
### Description
367367
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.
369369
370370
### Apply To Component Types
371371
@@ -585,7 +585,7 @@ Component based on the following kinds of resources:
585585
### Examples (container-ports)
586586
587587
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 `&lt;hostIP, hostPort, protocol&gt;` 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.
589589
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.
590590
```yaml
591591
apiVersion: core.oam.dev/v1beta1
@@ -935,6 +935,9 @@ spec:
935935
gatewayHost | Specify the host of the ingress gateway, which is used to generate the endpoints when the host is empty. | string | false |
936936
name | Specify a unique name for this gateway, required to support multiple gateway traits on a component. | string | false |
937937
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 |
938941
939942
940943
## Hostalias
@@ -1817,6 +1820,78 @@ spec:
18171820
cpu | | string | false | 0.5
18181821
18191822
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+
18201895
## Resource
18211896
18221897
### Description
@@ -1830,6 +1905,7 @@ Component based on the following kinds of resources:
18301905
- statefulsets.apps
18311906
- daemonsets.apps
18321907
- jobs.batch
1908+
- cronjobs.batch
18331909
18341910
18351911
@@ -1940,6 +2016,99 @@ spec:
19402016
replicas | Specify the number of workload. | int | false | 1
19412017
19422018
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+
19432112
## Service-Account
19442113
19452114
### Description
@@ -2376,7 +2545,7 @@ spec:
23762545
properties:
23772546
containerName: "busybox-runner"
23782547
httpGet:
2379-
host: "www.guidewire.com"
2548+
host: "www.guidewire.comm"
23802549
scheme: "HTTPS"
23812550
port: 443
23822551
periodSeconds: 4
@@ -2456,7 +2625,7 @@ spec:
24562625

24572626
Name | Description | Type | Required | Default
24582627
---- | ----------- | ---- | -------- | -------
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 |
24602629
host | Host name to connect to, defaults to the pod IP. | string | false |
24612630

24622631

@@ -2522,7 +2691,7 @@ spec:
25222691

25232692
Name | Description | Type | Required | Default
25242693
---- | ----------- | ---- | -------- | -------
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 |
25262695
host | Host name to connect to, defaults to the pod IP. | string | false |
25272696

25282697

0 commit comments

Comments
 (0)