Skip to content

Commit 8a0c365

Browse files
authored
Merge pull request #112757 from mburke5678/cqa-nodes-9-1
OSDOCS CQA NODES-9: Autoscaling and Miscellaneous I
2 parents 31be630 + 2d05686 commit 8a0c365

12 files changed

Lines changed: 195 additions & 154 deletions

modules/nodes-pods-adjust-resources-in-place-about.adoc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
[id="nodes-pods-adjust-resources-in-place-about_{context}"]
77
= About in-place pod resizing
88

9-
In-place pod resizing allows you to change the CPU and memory resources for containers within a running pod without application disruption. The standard methods for changing pod CPU and memory resources cause the pod to be re-created, potentially causing disruption. In-place pod resizing allows you to scale pod resources up or down without suffering the downtime or state loss associated with a pod restart.
9+
[role="_abstract"]
10+
You can use in-place pod resizing to change the CPU and memory resources for containers within a running pod without suffering the downtime or state loss associated with a pod restart.
11+
12+
The standard methods for changing pod CPU and memory resources cause the pod to be re-created, potentially causing disruption. You can use in-place pod resizing to scale pod resources up or down without application disruption.
1013

1114
When using in-place pod resizing to change CPU or memory resources, you can control whether a pod is restarted by configuring a resize policy in the pod specification. The following example resize policy requires a pod restart upon changing the memory resources, but prevents a restart for CPU resource changes.
1215

@@ -25,13 +28,15 @@ spec:
2528
containers:
2629
- name: pause
2730
# ...
28-
resizePolicy: <1>
31+
resizePolicy:
2932
- resourceName: cpu
3033
restartPolicy: NotRequired
3134
- resourceName: memory
3235
restartPolicy: RestartContainer
3336
----
34-
<1> Specifies a resize policy.
37+
where:
38+
39+
`spec.containers.resizePolicy`:: Specifies a resize policy.
3540

3641
[NOTE]
3742
====

modules/nodes-pods-adjust-resources-in-place-configuring.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[id="nodes-pods-adjust-resources-in-place-configuring_{context}"]
77
= Configuring in-place pod resizing
88

9-
In-place pod resizing requires that you add a resize policy to a pod specification.
9+
[role="_abstract"]
10+
You can use in-place pod resizing to scale pod resources up or down without application disruption by adding a resize policy to a pod specification.
1011

1112
You cannot add or modify a resize policy in an existing pod, but you can add or edit the policy in the pod's owner object, such as a deployment, if the pod has an owner object.
1213

@@ -26,14 +27,16 @@ spec:
2627
# ...
2728
containers:
2829
- name: pause
29-
resizePolicy: <1>
30+
resizePolicy:
3031
- resourceName: cpu
3132
restartPolicy: NotRequired
3233
- resourceName: memory
3334
restartPolicy: RestartContainer
3435
# ...
3536
----
36-
<1> Specifies a resize policy. For CPU and/or memory resources specify one of the following values:
37+
where:
38+
39+
`spec.containers.resizePolicy`:: Specifies a resize policy. For CPU and/or memory resources specify one of the following values:
3740
+
3841
* `NotRequired`: Apply any resource changes without restarting the pod. This is the default when using a resize policy.
3942
* `RestartContainer`: Apply any resource changes and restart the pod.

modules/nodes-pods-image-volume-about.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
= Understanding image volumes
88

99
[role="_abstract"]
10-
You can you use an _image volume_ to mount an Open Container Initiative (OCI)-compliant container image or artifact directly into a pod as a native volume source, making the OCI object accessible to the containers without the need to include them in the base image. OCI objects enable users to store and distribute arbitrary files and metadata through OCI-compliant container registries.
10+
You can you use an _image volume_ to mount an Open Container Initiative (OCI)-compliant container image or artifact directly into a pod as a native volume source, making the OCI object accessible to the containers without the need to include them in the base image.
11+
12+
OCI objects enable users to store and distribute arbitrary files and metadata through OCI-compliant container registries.
1113

1214
By using an image volume in a pod, you can take advantage of the OCI image and distribution specification standards to accomplish several tasks including the following use cases:
1315

modules/nodes-pods-image-volume-adding.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
= Adding an image volume to a pod
88

99
[role="_abstract"]
10-
To mount an Open Container Initiative (OCI)-compliant container image or artifact, use the `volume` parameter in your pod spec to include a path to the image or artifact, along with an optional pull policy. You can create the pod directly or use a controlling object, such as a deployment or replica set.
10+
To mount an Open Container Initiative (OCI)-compliant container image or artifact, use the `volume` parameter in your pod spec to include a path to the image or artifact, along with an optional pull policy.
11+
12+
You can create the pod directly or use a controlling object, such as a deployment or replica set.
1113

1214
.Procedure
1315

modules/nodes-sigstore-configure-cluster-policy.adoc

Lines changed: 74 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
= Creating a cluster image policy CR
88

99
[role="_abstract"]
10-
A `ClusterImagePolicy` custom resource (CR) enables a cluster administrator to configure a sigstore signature verification policy for the entire cluster. When enabled, the Machine Config Operator (MCO) watches the `ClusterImagePolicy` object and updates the `/etc/containers/policy.json` and `/etc/containers/registries.d/sigstore-registries.yaml` files on all the nodes in the cluster.
10+
A cluster administrator can use a `ClusterImagePolicy` custom resource (CR) to configure a sigstore signature verification policy for the entire cluster.
11+
12+
When enabled, the Machine Config Operator (MCO) watches the `ClusterImagePolicy` object and updates the `/etc/containers/policy.json` and `/etc/containers/registries.d/sigstore-registries.yaml` files on all the nodes in the cluster.
1113

1214
The following example shows general guidelines on how to configure a `ClusterImagePolicy` object. For more details on the parameters, see "About cluster and image policy parameters."
1315

@@ -35,117 +37,126 @@ mirror.com/image/repo:sha256-1234567890abcdef1234567890abcdef1234567890abcdef123
3537

3638
. Create a cluster image policy object similar to the following examples. See "About image policy parameters" for specific details on these parameters.
3739
+
38-
--
39-
.Example cluster image policy object with a public key policy and the `MatchRepoDigestOrExact` match policy
40+
The following example cluster image policy object uses a public key policy and the `MatchRepoDigestOrExact` match policy:
41+
+
4042
[source,yaml]
4143
----
4244
apiVersion: config.openshift.io/v1
43-
kind: ClusterImagePolicy <1>
45+
kind: ClusterImagePolicy
4446
metadata:
4547
name: p1
4648
spec:
47-
scopes: <2>
49+
scopes:
4850
- example.com
49-
policy: <3>
50-
rootOfTrust: <4>
51-
policyType: PublicKey <5>
51+
policy:
52+
rootOfTrust:
53+
policyType: PublicKey
5254
publicKey:
53-
keyData: a2V5RGF0YQ== <6>
54-
rekorKeyData: cmVrb3JLZXlEYXRh <7>
55-
signedIdentity: <8>
55+
keyData: a2V5RGF0YQ==
56+
rekorKeyData: cmVrb3JLZXlEYXRh
57+
signedIdentity:
5658
matchPolicy: MatchRepoDigestOrExact
5759
----
58-
<1> Creates a `ClusterImagePolicy` object.
59-
<2> Defines a list of repositories or images assigned to this policy. In a cluster image policy, make sure that the policy does not block the deployment of the {product-title} images in the `quay.io/openshift-release-dev/ocp-release` and `quay.io/openshift-release-dev/ocp-v4.0-art-dev` repositories. Images in these repositories are required for cluster operation.
60-
<3> Specifies the parameters that define how the images are verified.
61-
<4> Defines a root of trust for the policy.
62-
<5> Specifies the policy types that define the root of trust, either a public key, a BYOPKI certificate, or a link:https://docs.sigstore.dev/certificate_authority/overview/[Fulcio certificate]. This example uses a public key with Rekor verification.
63-
<6> For a public key policy, specifies a base64-encoded public key in the PEM format. The maximum length is 8192 characters.
64-
<7> Optional: Specifies a base64-encoded Rekor public key in the PEM format. The maximum length is 8192 characters.
65-
<8> Optional: Specifies one of the following processes to verify the identity in the signature and the actual image identity:
60+
where:
61+
+
62+
--
63+
`kind`:: Specifies that the configuration is for a `ClusterImagePolicy` object.
64+
`spec.scopes`:: Specifies a list of repositories or images assigned to this policy. In a cluster image policy, make sure that the policy does not block the deployment of the {product-title} images in the `quay.io/openshift-release-dev/ocp-release` and `quay.io/openshift-release-dev/ocp-v4.0-art-dev` repositories. Images in these repositories are required for cluster operation.
65+
`spec.policy`:: Specifies the parameters that define how the images are verified.
66+
`spec.policy.rootOfTrust`:: Specifies a root of trust for the policy.
67+
`spec.policy.rootOfTrust.policyType`:: Specifies the policy types that define the root of trust, either a public key, a BYOPKI certificate, or a link:https://docs.sigstore.dev/certificate_authority/overview/[Fulcio certificate]. This example uses a public key with Rekor verification.
68+
`spec.policy.rootOfTrust.publicKey.keyData`:: For a public key policy, specifies a base64-encoded public key in the PEM format. The maximum length is 8192 characters.
69+
`spec.policy.rootOfTrust.publicKey.rekorKeyData`:: Specifies a base64-encoded Rekor public key in the PEM format. The maximum length is 8192 characters. This parameter is optional.
70+
`spec.policy.signedIdentity`:: Specifies the process to verify the identity in the signature and the actual image identity. This parameter is optional. Specify one of the following processes:
6671
* `MatchRepoDigestOrExact`.
6772
* `MatchRepository`.
6873
* `ExactRepository`. The `exactRepository` parameter must be specified.
6974
* `RemapIdentity`. The `prefix` and `signedPrefix` parameters must be specified.
7075
--
7176
+
72-
--
73-
.Example cluster image policy object for a BYOPKI policy and the `MatchRepository` match policy
77+
The following example cluster image policy object uses a BYOPKI policy and the `MatchRepository` match policy:
78+
+
7479
[source,yaml]
7580
----
7681
apiVersion: config.openshift.io/v1alpha1
77-
kind: ClusterImagePolicy <1>
82+
kind: ClusterImagePolicy
7883
metadata:
7984
name: pki-policy
8085
spec:
8186
scopes:
82-
- example.io <2>
83-
policy: <3>
84-
rootOfTrust: <4>
85-
policyType: PKI <5>
86-
pki: <6>
87+
- example.io
88+
policy:
89+
rootOfTrust:
90+
policyType: PKI
91+
pki:
8792
caRootsData: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk....URS0tLS0t
8893
caIntermediatesData: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1J....lDQVRFLS0tLS0=
89-
pkiCertificateSubject: <7>
94+
pkiCertificateSubject:
9095
email: email@example.com
9196
hostname: myhost.example.com
9297
signedIdentity:
93-
matchPolicy: MatchRepository <8>
98+
matchPolicy: MatchRepository
9499
----
95-
<1> Creates a `ClusterImagePolicy` object.
96-
<2> Defines a list of repositories or images assigned to this policy. In a cluster image policy, make sure that the policy does not block the deployment of the {product-title} images in the `quay.io/openshift-release-dev/ocp-release` and `quay.io/openshift-release-dev/ocp-v4.0-art-dev` repositories. Images in these repositories are required for cluster operation.
97-
<3> Specifies the parameters that define how the images are verified.
98-
<4> Defines a root of trust for the policy.
99-
<5> Specifies the policy types that define the root of trust, either a public key, a BYOPKI certificate, or a link:https://docs.sigstore.dev/certificate_authority/overview/[Fulcio certificate]. This example uses a BYOPKI certificate.
100-
<6> For a BYOPKI certificate, specify `caRootsData`. This parameter specifies a base64-encoded CA root certificate in the PEM format. The maximum length is 8192 characters. Optionally with `caIntermediatesData`, specifies a base64-encoded intermediate CA root certificate in the PEM format. The maximum length is 8192 characters.
101-
<7> Specifies a subject alternative name (SAN) to authenticate the user’s identity by using a hostname and an email address:
100+
where:
101+
+
102+
--
103+
`kind`:: Specifies that the configuration is for a `ClusterImagePolicy` object.
104+
`spec.scopes`:: Specifies a list of repositories or images assigned to this policy. In a cluster image policy, make sure that the policy does not block the deployment of the {product-title} images in the `quay.io/openshift-release-dev/ocp-release` and `quay.io/openshift-release-dev/ocp-v4.0-art-dev` repositories. Images in these repositories are required for cluster operation.
105+
`spec.policy`:: Specifies the parameters that define how the images are verified.
106+
`spec.policy.rootOfTrust`:: Specifies a root of trust for the policy.
107+
`spec.policy.rootOfTrust.policyType`:: Specifies the policy types that define the root of trust, either a public key, a BYOPKI certificate, or a Fulcio certificate. This example uses a BYOPKI certificate.
108+
`spec.policy.rootOfTrust.pki`:: For a BYOPKI certificate, specifies `caRootsData`. This parameter specifies a base64-encoded CA root certificate in the PEM format. The maximum length is 8192 characters. Optionally with `caIntermediatesData`, specifies a base64-encoded intermediate CA root certificate in the PEM format. The maximum length is 8192 characters.
109+
`spec.policy.rootOfTrust.pki.pkiCertificateSubject`:: Specifies a subject alternative name (SAN) to authenticate the user’s identity by using a hostname and an email address:
102110
* `email`. Specifies the email address specified when the certificate was generated.
103111
* `hostname`. Specifies the hostname specified when the certificate was generated.
104-
<8> For a BYOPKI certificate, specify the `MatchRepository` parameter to verify the identity in the signature and the actual image identity. The default signed identity is `matchRepoDigestOrExact`, which requires a digest reference in the signature identity for verification. The signature identity in this case uses a repository reference, and does not include the image digest.
112+
`spec.policy.signedIdentity.matchPolicy`:: For a BYOPKI certificate, specifies the `MatchRepository` parameter to verify the identity in the signature and the actual image identity. The default signed identity is `matchRepoDigestOrExact`, which requires a digest reference in the signature identity for verification. The signature identity in this case uses a repository reference, and does not include the image digest.
105113
--
106114
+
107-
--
108-
.Example cluster image policy object with a Fulcio certificate policy and the `remapIdentity` match policy
115+
The following example cluster image policy object uses a Fulcio certificate policy and the `remapIdentity` match policy:
116+
+
109117
[source,yaml]
110118
----
111119
apiVersion: config.openshift.io/v1
112-
kind: ClusterImagePolicy <1>
120+
kind: ClusterImagePolicy
113121
metadata:
114122
name: p1
115123
spec:
116-
scopes: <2>
124+
scopes:
117125
- example.com
118-
policy: <3>
119-
rootOfTrust: <4>
120-
policyType: FulcioCAWithRekor <5>
121-
fulcioCAWithRekor: <6>
126+
policy:
127+
rootOfTrust:
128+
policyType: FulcioCAWithRekor
129+
fulcioCAWithRekor:
122130
fulcioCAData: a2V5RGF0YQ==
123131
fulcioSubject:
124132
oidcIssuer: "https://expected.OIDC.issuer/"
125133
signedEmail: "expected-signing-user@example.com"
126-
rekorKeyData: cmVrb3JLZXlEYXRh <7>
134+
rekorKeyData: cmVrb3JLZXlEYXRh
127135
signedIdentity:
128-
matchPolicy: RemapIdentity <8>
136+
matchPolicy: RemapIdentity
129137
remapIdentity:
130-
prefix: example.com <9>
131-
signedPrefix: mirror-example.com <10>
138+
prefix: example.com
139+
signedPrefix: mirror-example.com
132140
----
133-
<1> Creates a `ClusterImagePolicy` object.
134-
<2> Defines a list of repositories or images assigned to this policy. In a cluster image policy, make sure that the policy does not block the deployment of the {product-title} images in the `quay.io/openshift-release-dev/ocp-release` and `quay.io/openshift-release-dev/ocp-v4.0-art-dev` repositories. Images in these repositories are required for cluster operation.
135-
<3> Specifies the parameters that define how the images are verified.
136-
<4> Defines a root of trust for the policy.
137-
<5> Specifies the policy types that define the root of trust, either a public key, a BYOPKI certificate, or a link:https://docs.sigstore.dev/certificate_authority/overview/[Fulcio certificate]. This example uses a Fulcio certificate with required Rekor verification.
138-
<6> For a Fulcio certificate policy, the following parameters are required:
141+
where:
142+
+
143+
--
144+
`kind`:: Specifies that the configuration is for a `ClusterImagePolicy` object.
145+
`spec.scopes`:: Specifies a list of repositories or images assigned to this policy. In a cluster image policy, make sure that the policy does not block the deployment of the {product-title} images in the `quay.io/openshift-release-dev/ocp-release` and `quay.io/openshift-release-dev/ocp-v4.0-art-dev` repositories. Images in these repositories are required for cluster operation.
146+
`spec.policy`:: Specifies the parameters that define how the images are verified.
147+
`spec.policy.rootOfTrust`:: Specifies a root of trust for the policy.
148+
`spec.policy.rootOfTrust.policyType`:: Specifies the policy types that define the root of trust, either a public key, a BYOPKI certificate, or a Fulcio certificate. This example uses a Fulcio certificate with required Rekor verification.
149+
`spec.policy.rootOfTrust.fulcioCAWithRekor`:: For a Fulcio certificate policy, the following parameters are required:
139150
* `fulcioCAData`: Specifies a base64-encoded Fulcio certificate in the PEM format. The maximum length is 8192 characters.
140151
* `fulcioSubject`: Specifies the OIDC issuer and the email of the Fulcio authentication configuration.
141-
<7> Specifies a base64-encoded Rekor public key in the PEM format. This parameter is required when the `policyType` is `FulcioCAWithRekor`. The maximum length is 8192 characters.
142-
<8> Optional: Specifies one of the following processes to verify the identity in the signature and the actual image identity.
152+
* `rekorKeyData`: Specifies a base64-encoded Rekor public key in the PEM format. This parameter is required when the `policyType` is `FulcioCAWithRekor`. The maximum length is 8192 characters.
153+
`spec.policy.signedIdentity.matchPolicy`:: Specifies one of the following processes to verify the identity in the signature and the actual image identity. This parameter is optional.
143154
* `MatchRepoDigestOrExact`.
144155
* `MatchRepository`.
145156
* `ExactRepository`. The `exactRepository` parameter must be specified.
146157
* `RemapIdentity`. The `prefix` and `signedPrefix` parameters must be specified.
147-
<9> For the `remapIdentity` match policy, specifies the prefix that should be matched against the scoped image prefix. If the two match, the scoped image prefix is replaced with the value of `signedPrefix`. The maximum length is 512 characters.
148-
<10> For the `remapIdentity` match policy, specifies the image prefix to be remapped, if needed. The maximum length is 512 characters.
158+
`spec.policy.signedIdentity.remapIdentity.prefix`:: For the `remapIdentity` match policy, specifies the prefix that should be matched against the scoped image prefix. If the two match, the scoped image prefix is replaced with the value of `signedPrefix`. The maximum length is 512 characters.
159+
`spec.policy.signedIdentity.remapIdentity.signedPrefix`:: For the `remapIdentity` match policy, specifies the image prefix to be remapped, if needed. The maximum length is 512 characters.
149160
--
150161

151162
. Create the cluster image policy object:
@@ -263,9 +274,11 @@ sh-5.1# cat /etc/containers/registries.d/sigstore-registries.yaml
263274
----
264275
docker:
265276
example.com:
266-
use-sigstore-attachments: true <1>
277+
use-sigstore-attachments: true
267278
quay.io/openshift-release-dev/ocp-release:
268279
use-sigstore-attachments: true
269280
----
270-
<1> When `true`, specifies that sigstore signatures are going to be read along with the image.
281+
where:
282+
283+
`docker.example.com.use-sigstore-attachments`:: When `true`, specifies that sigstore signatures are going to be read along with the image.
271284
// https://github.com/openshift/api/blob/master/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml

0 commit comments

Comments
 (0)