-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #368 from czomo/certs
[jaeger-operator] Add cert machinery
- Loading branch information
Showing
12 changed files
with
1,740 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,5 +43,30 @@ jobs: | |
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Install kubectl | ||
uses: azure/[email protected] | ||
with: | ||
version: 'v1.22.0' | ||
id: install | ||
|
||
- name: Set up cert-manager | ||
run: | | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml --namespace ingress-nginx | ||
kubectl label node --all ingress-ready=true | ||
kubectl describe pod --selector=app.kubernetes.io/component=controller -n ingress-nginx | ||
kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=5m | ||
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml | ||
- name: Set up cmctl | ||
run: | | ||
curl -sSL -o cmctl.tar.gz https://github.com/cert-manager/cert-manager/releases/download/v1.6.1/cmctl-linux-amd64.tar.gz | ||
tar xzf cmctl.tar.gz | ||
sudo mv cmctl /usr/local/bin | ||
cmctl version | ||
- name: Check if cert-manager is up | ||
run: | | ||
cmctl check api --wait=5m | ||
- name: Run chart-testing (install) | ||
run: ct install --config ct.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,464 changes: 1,441 additions & 23 deletions
1,464
charts/jaeger-operator/crds/crd.yaml → charts/jaeger-operator/crd/crd.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if .Values.certs.certificate.create }} | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: {{ default "jaeger-operator-service-cert" .Values.certs.certificate.secretName }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
dnsNames: | ||
- "{{ default "jaeger-operator-webhook-service" .Values.webhooks.service.name }}.{{ .Release.Namespace }}.svc" | ||
- "{{ default "jaeger-operator-webhook-service" .Values.webhooks.service.name }}.{{ .Release.Namespace }}.svc.cluster.local" | ||
issuerRef: | ||
kind: Issuer | ||
name: {{ default "selfsigned-issuer" .Values.certs.issuer.name }} | ||
secretName: {{ default "jaeger-operator-service-cert" .Values.certs.certificate.secretName }} | ||
subject: | ||
organizationalUnits: | ||
- "{{ include "jaeger-operator.name" . }}" | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{- if .Values.certs.issuer.create }} | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: {{ default "selfsigned-issuer" .Values.certs.issuer.name }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
selfSigned: {} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{{- if and (.Values.webhooks.mutatingWebhook.create) (.Values.webhooks.service.create) }} | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
annotations: | ||
cert-manager.io/inject-ca-from: {{ default .Release.Namespace .Values.certs.certificate.namespace }}/{{ default "jaeger-operator-service-cert" .Values.certs.certificate.secretName }} | ||
labels: | ||
{{ include "jaeger-operator.labels" . | indent 4 }} | ||
name: jaeger-operator-mutating-webhook-configuration | ||
webhooks: | ||
- admissionReviewVersions: | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: {{ default "jaeger-operator-webhook-service" .Values.webhooks.service.name }} | ||
namespace: {{ .Release.Namespace }} | ||
path: /mutate-v1-deployment | ||
failurePolicy: Ignore | ||
name: deployment.sidecar-injector.jaegertracing.io | ||
objectSelector: | ||
matchExpressions: | ||
- key: app.kubernetes.io/name | ||
operator: NotIn | ||
values: | ||
- {{ include "jaeger-operator.name" . }} | ||
rules: | ||
- apiGroups: | ||
- apps | ||
apiVersions: | ||
- v1 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- deployments | ||
sideEffects: None | ||
- admissionReviewVersions: | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: {{ default "jaeger-operator-webhook-service" .Values.webhooks.service.name }} | ||
namespace: {{ .Release.Namespace }} | ||
path: /mutate-jaegertracing-io-v1-jaeger | ||
failurePolicy: Fail | ||
name: mjaeger.kb.io | ||
rules: | ||
- apiGroups: | ||
- jaegertracing.io | ||
apiVersions: | ||
- v1 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- jaegers | ||
sideEffects: None | ||
{{- end }} |
Oops, something went wrong.