Skip to content
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

feat(etcd-backup): add custom CA support #78

Closed
wants to merge 3 commits into from

Conversation

vmaillot
Copy link
Contributor

Title says it all.

backup.sh Outdated
if [ "${OCP_BACKUP_S3_CA}" ]; then
echo -n "${OCP_BACKUP_S3_CA}" > /etc/pki/ca-trust/source/anchors/ca.crt
update-ca-trust
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't we just mount the ca to /etc/pki/ca-trust/source/anchors/ca.crt from a ConfigMap?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will imply having a dedicated configMap for just the CA, I wanted to avoid that, what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afair that's what the previous update-ca-trust call is for

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something like trust-manager could manage the cm (or the ca management thing on openshift?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afair that's what the previous update-ca-trust call is for

yeah right... let's do it that way then! we can just referencing an item, let's see

something like trust-manager could manage the cm (or the ca management thing on openshift?)

i can totally agree, but this would bring way more overhead that we have already, i wanted to replicate how we are achieving this with velero

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about this @hairmare?

Copy link
Contributor

@hairmare hairmare Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaict we can configure the cluster to know about the CA and create an empty configmap with the config.openshift.io/inject-trusted-cabundle="true" annotation using the openshift-etcd-backup chart and then magick should happen:

https://github.com/openshift/openshift-docs/blob/main/modules/certificate-injection-using-operators.adoc

Copy link
Contributor

@hairmare hairmare Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifically, the cluster should already know about the right CA. We use the same trust root that for basics like accessing internal registries. it is usually configured during installation, moreso in air-gapped cases than others.

The certificate injection feature seemingly aims to cover the same need that trust-manager wants to cover as a CNCF (sub-)project. The openshift/service-ca-operator looks like RedHat's upstream for their implementation that most likely predates trust-manager.

README.md Outdated Show resolved Hide resolved
Co-authored-by: Kevin Cottier <[email protected]>
@vmaillot
Copy link
Contributor Author

vmaillot commented Apr 2, 2024

i am closing this PR as we should be able to that in the helm chart only.

@vmaillot vmaillot closed this Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants