Skip to content

Commit

Permalink
rc3: fix helm chart webhooks certs & get blob for proxied docker libr…
Browse files Browse the repository at this point in the history
…ary (#403)

* fix get blob for docker library
* release rc3
* ingress: ingressClassName
* helm tls fixes
* fix helm hooks by using helm.sh/hook-weight
  • Loading branch information
awoimbee authored Jan 22, 2025
1 parent 89faf08 commit c456b07
Show file tree
Hide file tree
Showing 17 changed files with 142 additions and 106 deletions.
1 change: 1 addition & 0 deletions .github/workflows/config/install-kind-ingress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ do
sleep 1
((time_out--))
done
kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission
echo "Ingress Running"
2 changes: 1 addition & 1 deletion .github/workflows/config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ trow:
enabled: true
ingress:
enabled: true
ingressClassName: nginx
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-body-size: "0"
hosts:
- paths: ['/']
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ jobs:
- name: Install Ingress
run: |
.github/workflows/config/install-kind-ingress.sh
kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission
- name: Sideload Trow image
run: |
kind load image-archive /tmp/trow_image.tar.zst
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "trow"
version = "0.7.0-rc2"
version = "0.7.0-rc3"
authors = []
edition = "2021"

Expand Down
4 changes: 2 additions & 2 deletions charts/trow/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ maintainers:
- name: awoimbee
url: https://github.com/awoimbee

version: 0.9.0-rc2
appVersion: 0.7.0-rc2
version: 0.9.0-rc3
appVersion: 0.7.0-rc3
5 changes: 4 additions & 1 deletion charts/trow/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
{{- if .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
Expand Down
4 changes: 2 additions & 2 deletions charts/trow/templates/webhooks/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ spec:
{{- if (not (empty .Values.webhooks.tls.existingSecretRef)) }}
secretName: {{ .Values.webhooks.tls.existingSecretRef }}
{{- else if .Values.webhooks.tls.certmanager.enabled }}
secretName: {{ include "trow.fullname" . }}-cm-admission
secretName: {{ include "trow.fullname" . }}-cm-webhooks
{{- else if .Values.webhooks.tls.patch.enabled }}
secretName: {{ include "trow.fullname" . }}-patch-admission
secretName: {{ include "trow.fullname" . }}-patch-webhooks
{{- end }}
- name: webhook-cert-translated
emptyDir: {}
Expand Down
4 changes: 2 additions & 2 deletions charts/trow/templates/webhooks/mutatingwebhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ metadata:
app.kubernetes.io/component: admission-webhook
annotations:
{{- if .Values.webhooks.tls.certmanager.enabled }}
certmanager.k8s.io/inject-ca-from: {{ printf "%s/%s-admission" (.Release.Namespace) (include "trow.fullname" .) | quote }}
cert-manager.io/inject-ca-from: {{ printf "%s/%s-admission" (.Release.Namespace) (include "trow.fullname" .) | quote }}
certmanager.k8s.io/inject-ca-from: {{ printf "%s/%s-webhooks" (.Release.Namespace) (include "trow.fullname" .) | quote }}
cert-manager.io/inject-ca-from: {{ printf "%s/%s-webhooks" (.Release.Namespace) (include "trow.fullname" .) | quote }}
{{- end }}
webhooks:
- name: mutate.trow.io
Expand Down
26 changes: 13 additions & 13 deletions charts/trow/templates/webhooks/tls-certmanager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: {{ include "trow.fullname" . }}-cm-admission-self-signed-issuer
name: {{ include "trow.fullname" . }}-cm-webhooks-self-signed-issuer
namespace: {{ .Release.Namespace }}
spec:
selfSigned: {}
Expand All @@ -14,13 +14,13 @@ spec:
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ include "trow.fullname" . }}-cm-admission-root-cert
name: {{ include "trow.fullname" . }}-cm-webhooks-root-cert
namespace: {{ .Release.Namespace }}
spec:
secretName: {{ include "trow.fullname" . }}-cm-admission-root-cert
secretName: {{ include "trow.fullname" . }}-cm-webhooks-root-cert
duration: {{ .Values.webhooks.tls.certmanager.rootCert.duration | default "43800h0m0s" | quote }}
issuerRef:
name: {{ include "trow.fullname" . }}-cm-admission-self-signed-issuer
name: {{ include "trow.fullname" . }}-cm-webhooks-self-signed-issuer
commonName: "ca.webhook.trow"
isCA: true
subject:
Expand All @@ -31,31 +31,31 @@ spec:
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: {{ include "trow.fullname" . }}-cm-admission-root-issuer
name: {{ include "trow.fullname" . }}-cm-webhooks-root-issuer
namespace: {{ .Release.Namespace }}
spec:
ca:
secretName: {{ include "trow.fullname" . }}-cm-admission-root-cert
secretName: {{ include "trow.fullname" . }}-cm-webhooks-root-cert
---
# generate a server certificate for the apiservices to use
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ include "trow.fullname" . }}-admission
name: {{ include "trow.fullname" . }}-webhooks
namespace: {{ .Release.Namespace }}
spec:
secretName: {{ include "trow.fullname" . }}-cm-admission
duration: {{ .Values.webhooks.tls.certmanager.admissionCert.duration | default "8760h0m0s" | quote }}
secretName: {{ include "trow.fullname" . }}-cm-webhooks
duration: {{ .Values.webhooks.tls.certmanager.webhooksCert.duration | default "8760h0m0s" | quote }}
issuerRef:
{{- if .Values.webhooks.tls.certmanager.issuerRef }}
{{- toYaml .Values.webhooks.tls.certmanager.issuerRef | nindent 4 }}
{{- else }}
name: {{ include "trow.fullname" . }}-cm-admission-root-issuer
name: {{ include "trow.fullname" . }}-cm-webhooks-root-issuer
{{- end }}
dnsNames:
- {{ include "trow.fullname" . }}-admission
- {{ include "trow.fullname" . }}-admission.{{ .Release.Namespace }}
- {{ include "trow.fullname" . }}-admission.{{ .Release.Namespace }}.svc
- {{ include "trow.fullname" . }}-webhooks
- {{ include "trow.fullname" . }}-webhooks.{{ .Release.Namespace }}
- {{ include "trow.fullname" . }}-webhooks.{{ .Release.Namespace }}.svc
subject:
organizations:
- trow-registry
Expand Down
Loading

0 comments on commit c456b07

Please sign in to comment.