Skip to content

Commit

Permalink
Force a rename of the catalogd certificate (#386)
Browse files Browse the repository at this point in the history
This will cause the catalogd deployment to restart, meaning that the
catalogd will update quicker (rather than waiting on k8s to update the
certificates via the volume)

Signed-off-by: Todd Short <todd.short@me.com>
  • Loading branch information
tmshort committed Sep 9, 2024
1 parent 40cb322 commit 52246e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ deploy: export MANIFEST="./catalogd.yaml"
deploy: export DEFAULT_CATALOGS="./config/base/default/clustercatalogs/default-catalogs.yaml"
deploy: $(KUSTOMIZE) ## Deploy Catalogd to the K8s cluster specified in ~/.kube/config with cert-manager and default clustercatalogs
cd config/base/manager && $(KUSTOMIZE) edit set image controller=$(IMAGE) && cd ../../..
$(KUSTOMIZE) build config/overlays/cert-manager > catalogd.yaml
$(KUSTOMIZE) build config/overlays/cert-manager | sed "s/cert-git-version/cert-$(GIT_VERSION)/g" > catalogd.yaml
envsubst '$$CERT_MGR_VERSION,$$MANIFEST,$$DEFAULT_CATALOGS' < scripts/install.tpl.sh | bash -s

.PHONY: only-deploy-manifest
Expand Down Expand Up @@ -242,7 +242,7 @@ release: $(GORELEASER) ## Runs goreleaser for catalogd. By default, this will ru
quickstart: export MANIFEST := https://github.com/operator-framework/catalogd/releases/download/$(VERSION)/catalogd.yaml
quickstart: export DEFAULT_CATALOGS := https://github.com/operator-framework/catalogd/releases/download/$(VERSION)/default-catalogs.yaml
quickstart: $(KUSTOMIZE) generate ## Generate the installation release manifests and scripts
$(KUSTOMIZE) build config/overlays/cert-manager | sed "s/:devel/:$(GIT_VERSION)/g" > catalogd.yaml
$(KUSTOMIZE) build config/overlays/cert-manager | sed "s/:devel/:$(GIT_VERSION)/g" | sed "s/cert-git-version/cert-$(GIT_VERSION)/g" > catalogd.yaml
envsubst '$$CERT_MGR_VERSION,$$MANIFEST,$$DEFAULT_CATALOGS' < scripts/install.tpl.sh > install.sh

.PHONY: demo-update
Expand Down
4 changes: 2 additions & 2 deletions config/components/tls/patches/manager_deployment_certs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- op: add
path: /spec/template/spec/volumes/-
value: {"name":"catalogserver-certs", "secret":{"secretName":"catalogd-catalogserver-cert"}}
value: {"name":"catalogserver-certs", "secret":{"secretName":"catalogd-catalogserver-cert-git-version"}}
- op: add
path: /spec/template/spec/containers/1/volumeMounts/-
value: {"name":"catalogserver-certs", "mountPath":"/var/certs"}
Expand All @@ -9,4 +9,4 @@
value: "--tls-cert=/var/certs/tls.crt"
- op: add
path: /spec/template/spec/containers/1/args/-
value: "--tls-key=/var/certs/tls.key"
value: "--tls-key=/var/certs/tls.key"
2 changes: 1 addition & 1 deletion config/components/tls/resources/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: catalogserver-cert
namespace: system
spec:
secretName: catalogd-catalogserver-cert
secretName: catalogd-catalogserver-cert-git-version
dnsNames:
- localhost
- catalogd-catalogserver.olmv1-system.svc
Expand Down

0 comments on commit 52246e1

Please sign in to comment.