-
Notifications
You must be signed in to change notification settings - Fork 10
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
Change a cluster's trust bundle #110
Conversation
Skipping CI for Draft Pull Request. |
983b9ce
to
a3696c7
Compare
/test baremetalds-sno-recert-cluster-rename |
/test baremetalds-sno-recert-cluster-rename |
src/ocp_postprocess/additional_trust_bundle/filesystem_rename.rs
Outdated
Show resolved
Hide resolved
src/ocp_postprocess/additional_trust_bundle/filesystem_rename.rs
Outdated
Show resolved
Hide resolved
# Main change Support changing a cluster's additional trust bundle. Changes all locations where the additional trust bundle is stored in. If an existing trust bundle is not found, this will cause an error, as creating the relevant resources is beyond the scope of this tool. The trust bundle's validity will not be checked. When using a RECERT_CONFIG file, raw PEMS can be used instead of a path to a trust bundle file. When using this feature it is recommended to also run the `update-ca-trust` script after running recert to ensure that the trust bundle is properly updated in all locations. # Other changes * Created `./hack/` directory to store some certs used during `./run_seed.sh` * Deprecated --static-files and --static-dirs, which were used for both recert and rename. Now `--crypto-dir` and `--crypto-file` will be used for recert while `--cluster-customization-dir` and `--cluster-customization-file` will be used for rename (aka cluster customization). This was needed because /etc/pki is full of certs we discover and fail to process during recert, but we do need to process /etc/pki for editing the additional trust bundle cluster customization. Using `--additional-trust-bundle` along with `--static-*` will cause an error. The old behavior for `--static-files` and `--static-dirs` is maintained for backwards compatibility, but they cannot be used along with the new flags. * Made ConfigPath a less leaky abstraction for ClioPath and moved its relevant code to its own module `path` (under `config`) * Renamed many `cli_parse` functions to `parse` as those functions were used outside of CLI parsing as well (during config file parsing) * Refactored config parsing into topical functions because that functions was getting a bit too long
/lgtm I tested it with LCA |
/approve |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mresvanis, omertuc The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Incomplete, still testing and need to add a bit more code # Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
Incomplete, still testing and need to add a bit more code # Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
Incomplete, still testing and need to add a bit more code # Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
Incomplete, still testing and need to add a bit more code # Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
Incomplete, still testing and need to add a bit more code # Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
Incomplete, still testing and need to add a bit more code # Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
# Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
# Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
# Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
# Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
# Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
# Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
# Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
# Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
# Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
# Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
# Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
# Background / Context Recert recently added ([1], [2]) some options that allow changing the cluster's trust bundle (it's recommended you read the PRs for more background about this). # Issue / Requirement / Reason for change The lifecycle-agent doesn't make use of the new options added to recert # Solution / Feature Overview Change the lifecycle-agent to use the new options added to recert # Implementation Details Multiple new fields have been added. - `AdditionalTrustBundle` in `SeedReconfiguration`. This represents the trust bundle to be used for seed-reconfiguration. This contains the user-ca-bundle contents, the proxy configmap name, and the proxy configmap contents. - `AdditionalTrustBundle` in `SeedClusterInfo`. This represents the state of the trust bundle in the seed cluster. This is simply booleans indicating the presence or lack there-of of the user-ca-bundle and the proxy configmap name (only if it actually has contents, a configmap with no contents is considered invalid OCP configuration). This is useful for when we want to verify that the seed is compatible with our desired `SeedReconfiguration`. - `RecertConfig` will now use the new `CryptoDirs` and `CryptoFiles` fields to specify the directories and files that should be considered part of the cluster's crypto material. Along with the `ClusterCustomizationDirs` and `ClusterCustomizationFiles` fields that specify the directories and files involved in cluster customization. Since these no longer overlap when it comes to customizing the trust bundle, we must use these new fields instead of the old common `StaticDirs` and `StaticFiles` fields. [1] rh-ecosystem-edge/recert#110 [2] rh-ecosystem-edge/recert#140
Main change
Support changing a cluster's additional trust bundle. Changes all locations where the additional trust bundle is stored in.
If an existing trust bundle is not found, this will cause an error, as creating the relevant resources is beyond the scope of this tool.
The trust bundle's validity will not be checked. When using a RECERT_CONFIG file, raw PEMS can be used instead of a path to a trust bundle file.
When using this feature it is recommended to also run the
update-ca-trust
script after running recert to ensure that the trust bundle is properly updated in all locations.Other changes
Created
./hack/
directory to store some certs used during./run_seed.sh
Deprecated --static-files and --static-dirs, which were used for both recert and rename. Now
--crypto-dir
and--crypto-file
will be used for recert while--cluster-customization-dir
and--cluster-customization-file
will be used for rename (aka cluster customization). This was needed because /etc/pki is full of certs we discover and fail to process during recert, but we do need to process /etc/pki for editing the additional trust bundle cluster customization. Using--additional-trust-bundle
along with--static-*
will cause an error. The old behavior for--static-files
and--static-dirs
is maintained for backwards compatibility, but they cannot be used along with the new flags.Made ConfigPath a less leaky abstraction for ClioPath and moved its relevant code to its own module
path
(underconfig
)Renamed many
cli_parse
functions toparse
as those functions were used outside of CLI parsing as well (during config file parsing)Refactored config parsing into topical functions because that functions was getting a bit too long