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

tls: persist generated TLS cert/key pair (PROJQUAY-1838) #453

Merged
merged 1 commit into from
May 14, 2021

Conversation

alecmerdler
Copy link
Contributor

Move the 'ssl.cert' and 'ssl.key' to a separate, persistent
Secret to ensure that the cert/key pair is not re-generated
on every reconcile. Use k8s projected volumes to mount the
config and TLS Secrets to the same directory in the Quay
container.

Signed-off-by: Alec Merdler alecmerdler@gmail.com

@alecmerdler alecmerdler force-pushed the PROJQUAY-1838 branch 3 times, most recently from cb3a0c0 to f28e47d Compare May 5, 2021 08:01
- name: configvolume
secret:
secretName: quay-config-secret
- name: config
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switch to use k8s projected volume to mount both Secretscontaining config bundle and TLS cert/key into the same /conf/stack directory in the container.

@alecmerdler alecmerdler added the tng label May 5, 2021
@alecmerdler alecmerdler force-pushed the PROJQUAY-1838 branch 3 times, most recently from 7f6050c to 9507d22 Compare May 14, 2021 20:03
Move the 'ssl.cert' and 'ssl.key' to a separate, persistent
Secret to ensure that the cert/key pair is not re-generated
on every reconcile. Use k8s projected volumes to mount the
config and TLS Secrets to the same directory in the Quay
container.

Signed-off-by: Alec Merdler <alecmerdler@gmail.com>
@@ -192,9 +237,9 @@ func (r *QuayRegistryReconciler) checkObjectBucketClaimsAvailable(ctx *quayconte
}

// TODO: Improve this once `builds` is a managed component.
func (r *QuayRegistryReconciler) checkBuildManagerAvailable(ctx *quaycontext.QuayRegistryContext, quay *v1.QuayRegistry, rawConfig []byte) (*quaycontext.QuayRegistryContext, *v1.QuayRegistry, error) {
func (r *QuayRegistryReconciler) checkBuildManagerAvailable(ctx *quaycontext.QuayRegistryContext, quay *v1.QuayRegistry, configBundle map[string][]byte) (*quaycontext.QuayRegistryContext, *v1.QuayRegistry, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored all the "feature detection" functions to accept the full config bundle so that we can check ssl.cert/ssl.key, not just config.yaml.

@alecmerdler alecmerdler merged commit 8fe8456 into quay:master May 14, 2021
@alecmerdler alecmerdler deleted the PROJQUAY-1838 branch May 14, 2021 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant