-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Certifictes are generated by operator rather than gencerts.sh (#2016)
Signed-off-by: Yi Chen <[email protected]>
- Loading branch information
Showing
22 changed files
with
530 additions
and
499 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
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
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
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
62 changes: 0 additions & 62 deletions
62
charts/spark-operator-chart/templates/webhook-cleanup-job.yaml
This file was deleted.
Oops, something went wrong.
52 changes: 0 additions & 52 deletions
52
charts/spark-operator-chart/templates/webhook-init-job.yaml
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
charts/spark-operator-chart/templates/webhook/_helpers.tpl
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,14 @@ | ||
{{/* | ||
Create the name of the secret to be used by webhook | ||
*/}} | ||
{{- define "spark-operator.webhookSecretName" -}} | ||
{{ include "spark-operator.fullname" . }}-webhook-certs | ||
{{- end -}} | ||
|
||
|
||
{{/* | ||
Create the name of the service to be used by webhook | ||
*/}} | ||
{{- define "spark-operator.webhookServiceName" -}} | ||
{{ include "spark-operator.fullname" . }}-webhook-svc | ||
{{- 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,13 @@ | ||
{{- if .Values.webhook.enable -}} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "spark-operator.webhookSecretName" . }} | ||
labels: | ||
{{- include "spark-operator.labels" . | nindent 4 }} | ||
data: | ||
ca-key.pem: "" | ||
ca-cert.pem: "" | ||
server-key.pem: "" | ||
server-cert.pem: "" | ||
{{- end }} |
14 changes: 7 additions & 7 deletions
14
...ator-chart/templates/webhook-service.yaml → ...ator-chart/templates/webhook/service.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{{ if .Values.webhook.enable }} | ||
kind: Service | ||
{{- if .Values.webhook.enable -}} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "spark-operator.fullname" . }}-webhook | ||
name: {{ include "spark-operator.webhookServiceName" . }} | ||
labels: | ||
{{- include "spark-operator.labels" . | nindent 4 }} | ||
spec: | ||
selector: | ||
{{- include "spark-operator.selectorLabels" . | nindent 4 }} | ||
ports: | ||
- port: 443 | ||
targetPort: {{ .Values.webhook.portName | quote }} | ||
name: webhook | ||
selector: | ||
{{- include "spark-operator.selectorLabels" . | nindent 4 }} | ||
{{ end }} | ||
name: {{ .Values.webhook.portName }} | ||
{{- 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
31 changes: 31 additions & 0 deletions
31
charts/spark-operator-chart/tests/webhook/secret_test.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
suite: Test spark operator webhook secret | ||
|
||
templates: | ||
- webhook/secret.yaml | ||
|
||
release: | ||
name: spark-operator | ||
namespace: spark-operator | ||
|
||
tests: | ||
- it: Should not render the webhook secret if webhook.enable is false | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
|
||
- it: Should render the webhook secret with empty data fields | ||
set: | ||
webhook: | ||
enable: true | ||
asserts: | ||
- containsDocument: | ||
apiVersion: v1 | ||
kind: Secret | ||
name: spark-operator-webhook-certs | ||
- equal: | ||
path: data | ||
value: | ||
ca-key.pem: "" | ||
ca-cert.pem: "" | ||
server-key.pem: "" | ||
server-cert.pem: "" |
Oops, something went wrong.