-
Notifications
You must be signed in to change notification settings - Fork 1.9k
OSDOCS-17162: Misc apps CQA #117404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
OSDOCS-17162: Misc apps CQA #117404
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,22 @@ | ||
| :_mod-docs-content-type: ASSEMBLY | ||
| [id="idling-applications"] | ||
| = Idling applications | ||
| = Reducing resource consumption with application idling | ||
| include::_attributes/common-attributes.adoc[] | ||
| :context: idling-applications | ||
|
|
||
| toc::[] | ||
|
|
||
| Cluster administrators can idle applications to reduce resource consumption. This is useful when the cluster is deployed on a public cloud where cost is related to resource consumption. | ||
| [role="_abstract"] | ||
| As an administrator, you can reduce cluster resource consumption and lower public cloud costs by temporarily scaling inactive application resources to zero replicas. | ||
|
|
||
| If any scalable resources are not in use, {product-title} discovers and idles them by scaling their replicas to `0`. The next time network traffic is directed to the resources, the resources are unidled by scaling up the replicas, and normal operation continues. | ||
|
|
||
| Applications are made of services, as well as other scalable resources, such as deployment configs. The action of idling an application involves idling all associated resources. | ||
|
|
||
| include::modules/idle-idling-applications.adoc[leveloffset=+1] | ||
|
|
||
| include::modules/idle-idling-applications-single.adoc[leveloffset=+2] | ||
|
|
||
| include::modules/idle-idling-applications-multiple.adoc[leveloffset=+2] | ||
|
|
||
| include::modules/idle-unidling-applications.adoc[leveloffset=+1] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * applications/idling-applications.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="idle-idling-applications-multiple_{context}"] | ||
| = Idling multiple services | ||
|
|
||
| [role="_abstract"] | ||
| Scale multiple inactive services down to zero replicas to optimize cluster capacity. | ||
|
|
||
| Idling multiple services is helpful if an application spans across a set of services within a project, or when idling multiple services in conjunction with a script to idle multiple applications in bulk within the same project. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Create a file containing a list of the services, each on their own line. | ||
|
|
||
| . Idle the services using the `--resource-names-file` option: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc idle --resource-names-file <filename> | ||
| ---- | ||
| + | ||
| [NOTE] | ||
| ==== | ||
| The `idle` command is limited to a single project. For idling applications across | ||
| a cluster, run the `idle` command for each project individually. | ||
| ==== | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * applications/idling-applications.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="idle-idling-applications-single_{context}"] | ||
| = Idling a single service | ||
|
|
||
| [role="_abstract"] | ||
| Scale down the scalable resources of a specific service to zero replicas to reduce cluster consumption. | ||
|
|
||
| .Procedure | ||
|
|
||
| . To idle a single service, run: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc idle <service> | ||
| ---- |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,50 +2,11 @@ | |
| // | ||
| // * applications/idling-applications.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| :_mod-docs-content-type: CONCEPT | ||
| [id="idle-idling-applications_{context}"] | ||
| = Idling applications | ||
| = Application idling | ||
|
|
||
| Idling an application involves finding the scalable resources (deployment | ||
| configurations, replication controllers, and others) associated with a service. | ||
| Idling an application finds the service and marks it as idled, scaling down the | ||
| resources to zero replicas. | ||
| [role="_abstract"] | ||
| Identify the scalable resources for one or more services, such as deployment configurations and replication controllers, and scale them down to zero replicas to optimize cluster capacity. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖 [error] Vale.Avoid: Avoid using 'deployment configurations'. |
||
|
|
||
| You can use the `oc idle` command to idle a single service, or use the | ||
| `--resource-names-file` option to idle multiple services. | ||
|
|
||
| [id="idle-idling-applications-single_{context}"] | ||
| == Idling a single service | ||
|
|
||
| .Procedure | ||
|
|
||
| . To idle a single service, run: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc idle <service> | ||
| ---- | ||
|
|
||
| [id="idle-idling-applications-multiple_{context}"] | ||
| == Idling multiple services | ||
|
|
||
| Idling multiple services is helpful if an application spans across a set of | ||
| services within a project, or when idling multiple services in conjunction with | ||
| a script to idle multiple applications in bulk within the same project. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Create a file containing a list of the services, each on their own line. | ||
|
|
||
| . Idle the services using the `--resource-names-file` option: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc idle --resource-names-file <filename> | ||
| ---- | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| The `idle` command is limited to a single project. For idling applications across | ||
| a cluster, run the `idle` command for each project individually. | ||
| ==== | ||
| You can use the `oc idle` command to idle a single service, or use the `--resource-names-file` option to idle multiple services. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,9 @@ | |
| [id="pruning-deployments_{context}"] | ||
| = Pruning deployment resources | ||
|
|
||
| [role="_abstract"] | ||
| Delete completed or failed deployment configurations and pod records to free up cluster storage, reduce database clutter, and speed up resource lookups. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖 [error] Vale.Avoid: Avoid using 'deployment configurations'. |
||
|
|
||
| You can prune resources associated with deployments that are no longer required by the system, due to age and status. | ||
|
|
||
| The following command prunes replication controllers associated with `DeploymentConfig` objects: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,10 @@ | |
| [id="pruning-hard-pruning-registry_{context}"] | ||
| = Hard pruning the registry | ||
|
|
||
| The OpenShift Container Registry can accumulate blobs that are not referenced by | ||
| [role="_abstract"] | ||
| Hard prune the {product-registry} to remove orphaned image blobs that are not referenced in etcd and reclaim registry storage space when standard image pruning is insufficient. | ||
|
|
||
| The {product-registry} can accumulate blobs that are not referenced by | ||
| the {product-title} cluster's etcd. The basic pruning images procedure, | ||
| therefore, is unable to operate on them. These are called _orphaned blobs_. | ||
|
|
||
|
|
@@ -30,7 +33,7 @@ the image objects referencing them to be removed and the blobs becoming orphans. | |
|
|
||
| _Hard pruning_ the registry, a separate procedure from basic image pruning, | ||
| allows cluster administrators to remove orphaned blobs. You should hard prune if | ||
| you are running out of storage space in your OpenShift Container Registry and | ||
| you are running out of storage space in your {product-registry} and | ||
| believe you have orphaned blobs. | ||
|
|
||
| This should be an infrequent operation and is necessary only when you have | ||
|
|
@@ -40,20 +43,18 @@ day (depending on the number of images being created). | |
|
|
||
| .Procedure | ||
|
|
||
| To hard prune orphaned blobs from the registry: | ||
|
|
||
| . *Log in.* | ||
| . Log in. | ||
| + | ||
| Log in to the cluster with the CLI as `kubeadmin` or another privileged user that | ||
| has access to the `openshift-image-registry` namespace. | ||
|
|
||
| . *Run a basic image prune*. | ||
| . Run a basic image prune. | ||
| + | ||
| Basic image pruning removes additional images that are no longer needed. The | ||
| hard prune does not remove images on its own. It only removes blobs stored in | ||
| the registry storage. Therefore, you should run this just before the hard prune. | ||
|
|
||
| . *Switch the registry to read-only mode.* | ||
| . Switch the registry to read-only mode. | ||
| + | ||
| If the registry is not running in read-only mode, any pushes happening at the | ||
| same time as the prune will either: | ||
|
|
@@ -131,7 +132,7 @@ Would free up 2.835 GiB of disk space | |
| Use -prune=delete to actually delete the data | ||
| ---- | ||
|
|
||
| . *Run the hard prune.* | ||
| . Run the hard prune. | ||
| + | ||
| Execute the following command inside one running instance of a `image-registry` pod to run the hard prune. The following example references an image registry pod called `image-registry-3-vhndw`: | ||
| + | ||
|
|
@@ -147,7 +148,7 @@ Deleted 13374 blobs | |
| Freed up 2.835 GiB of disk space | ||
| ---- | ||
|
|
||
| . *Switch the registry back to read-write mode.* | ||
| . Switch the registry back to read-write mode. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖 [error] RedHat.TermsErrors: Use 'read/write' rather than 'read-write'. For more information, see RedHat.TermsErrors. |
||
| + | ||
| After the prune is finished, the registry can be switched back to read-write | ||
| mode. In `configs.imageregistry.operator.openshift.io/cluster`, set | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 [error] AsciiDocDITA.TaskStep: Content other than a single list cannot be mapped to DITA steps.