-
Notifications
You must be signed in to change notification settings - Fork 146
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 #588 from diconico07/autogen-webhook-certs
helm: Generate a self-signed cert for webhook if none given
- Loading branch information
Showing
20 changed files
with
225 additions
and
34 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "agent" | ||
version = "0.10.7" | ||
version = "0.10.8" | ||
authors = ["Kate Goldenring <[email protected]>", "<[email protected]>"] | ||
edition = "2018" | ||
rust-version = "1.68.1" | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "controller" | ||
version = "0.10.7" | ||
version = "0.10.8" | ||
authors = ["<[email protected]>", "<[email protected]>"] | ||
edition = "2018" | ||
rust-version = "1.68.1" | ||
|
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,181 @@ | ||
{{- if and .Values.webhookConfiguration.enabled (not .Values.webhookConfiguration.caBundle) -}} | ||
{{- if .Values.rbac.enabled }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ .Values.webhookConfiguration.name }}-patch | ||
annotations: | ||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade | ||
"helm.sh/hook-weight": "-5" | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
labels: | ||
{{- include "akri.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: admission-webhook | ||
rules: | ||
- apiGroups: | ||
- admissionregistration.k8s.io | ||
resources: | ||
- validatingwebhookconfigurations | ||
verbs: | ||
- get | ||
- update | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ .Values.webhookConfiguration.name }}-patch | ||
annotations: | ||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade | ||
"helm.sh/hook-weight": "-5" | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
labels: | ||
{{- include "akri.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: admission-webhook | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ .Values.webhookConfiguration.name }}-patch | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Values.webhookConfiguration.name }}-patch | ||
namespace: {{ .Release.Namespace | quote }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: {{ .Values.webhookConfiguration.name }}-patch | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade | ||
"helm.sh/hook-weight": "-5" | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
labels: | ||
{{- include "akri.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: admission-webhook | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
verbs: | ||
- get | ||
- create | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: {{ .Values.webhookConfiguration.name }}-patch | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade | ||
"helm.sh/hook-weight": "-5" | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
labels: | ||
{{- include "akri.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: admission-webhook | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: {{ .Values.webhookConfiguration.name }}-patch | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Values.webhookConfiguration.name }}-patch | ||
namespace: {{ .Release.Namespace | quote }} | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ .Values.webhookConfiguration.name }}-patch | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade | ||
"helm.sh/hook-weight": "-5" | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
labels: | ||
{{- include "akri.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: admission-webhook | ||
--- | ||
{{- end }} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ .Values.webhookConfiguration.name }}-create | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
"helm.sh/hook": pre-install,pre-upgrade | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
labels: | ||
{{- include "akri.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: admission-webhook | ||
spec: | ||
ttlSecondsAfterFinished: 0 | ||
template: | ||
metadata: | ||
name: {{ .Values.webhookConfiguration.name }}-create | ||
labels: | ||
{{- include "akri.labels" . | nindent 8 }} | ||
app.kubernetes.io/component: admission-webhook | ||
spec: | ||
containers: | ||
- name: create | ||
image: "{{ .Values.webhookConfiguration.certImage.reference }}:{{ .Values.webhookConfiguration.certImage.tag }}" | ||
imagePullPolicy: {{ .Values.webhookConfiguration.certImage.pullPolicy }} | ||
args: | ||
- create | ||
- --host={{ .Values.webhookConfiguration.name }},{{ .Values.webhookConfiguration.name }}.{{ .Release.Namespace }}.svc | ||
- --namespace={{ .Release.Namespace }} | ||
- --secret-name={{ .Values.webhookConfiguration.name }} | ||
- --cert-name=tls.crt | ||
- --key-name=tls.key | ||
env: | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
restartPolicy: OnFailure | ||
{{- if .Values.rbac.enabled }} | ||
serviceAccountName: {{ .Values.webhookConfiguration.name }}-patch | ||
{{- end }} | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ .Values.webhookConfiguration.name }}-patch | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
"helm.sh/hook": post-install,post-upgrade | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
labels: | ||
{{- include "akri.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: admission-webhook | ||
spec: | ||
ttlSecondsAfterFinished: 0 | ||
template: | ||
metadata: | ||
name: {{ .Values.webhookConfiguration.name }}-patch | ||
labels: | ||
{{- include "akri.labels" . | nindent 8 }} | ||
app.kubernetes.io/component: admission-webhook | ||
spec: | ||
containers: | ||
- name: patch | ||
image: "{{ .Values.webhookConfiguration.certImage.reference }}:{{ .Values.webhookConfiguration.certImage.tag }}" | ||
imagePullPolicy: {{ .Values.webhookConfiguration.certImage.pullPolicy }} | ||
args: | ||
- patch | ||
- --webhook-name={{ .Values.webhookConfiguration.name }} | ||
- --namespace={{ .Release.Namespace }} | ||
- --patch-mutating=false | ||
- --secret-name={{ .Values.webhookConfiguration.name }} | ||
- --patch-failure-policy=Fail | ||
env: | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
restartPolicy: OnFailure | ||
|
||
{{- if .Values.rbac.enabled }} | ||
serviceAccountName: {{ .Values.webhookConfiguration.name }}-patch | ||
{{- end }} | ||
{{- 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
2 changes: 1 addition & 1 deletion
2
discovery-handler-modules/debug-echo-discovery-handler/Cargo.toml
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "debug-echo-discovery-handler" | ||
version = "0.10.7" | ||
version = "0.10.8" | ||
authors = ["Kate Goldenring <[email protected]>"] | ||
edition = "2018" | ||
rust-version = "1.68.1" | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "onvif-discovery-handler" | ||
version = "0.10.7" | ||
version = "0.10.8" | ||
authors = ["Kate Goldenring <[email protected]>"] | ||
edition = "2018" | ||
rust-version = "1.68.1" | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "opcua-discovery-handler" | ||
version = "0.10.7" | ||
version = "0.10.8" | ||
authors = ["Kate Goldenring <[email protected]>"] | ||
edition = "2018" | ||
rust-version = "1.68.1" | ||
|
Oops, something went wrong.