feat: make secret configurable and add secret annotations to deployment (#32)

This commit is contained in:
Weixiao Huang 2021-11-05 03:36:21 +08:00 committed by GitHub
parent b7f73e3bd9
commit bba5c0769f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 12 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: clearml name: clearml
description: MLOps platform description: MLOps platform
type: application type: application
version: "3.0.4" version: "3.0.5"
appVersion: "1.1.1" appVersion: "1.1.1"
home: https://clear.ml home: https://clear.ml
icon: https://raw.githubusercontent.com/allegroai/clearml/master/docs/clearml-logo.svg icon: https://raw.githubusercontent.com/allegroai/clearml/master/docs/clearml-logo.svg

View File

@ -1,6 +1,6 @@
# ClearML Ecosystem for Kubernetes # ClearML Ecosystem for Kubernetes
![Version: 3.0.4](https://img.shields.io/badge/Version-3.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.1](https://img.shields.io/badge/AppVersion-1.1.1-informational?style=flat-square) ![Version: 3.0.5](https://img.shields.io/badge/Version-3.0.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.1](https://img.shields.io/badge/AppVersion-1.1.1-informational?style=flat-square)
MLOps platform MLOps platform
@ -281,6 +281,12 @@ For detailed instructions, see the [Optional Configuration](https://github.com/a
| redis.master.persistence.size | string | `"5Gi"` | | | redis.master.persistence.size | string | `"5Gi"` | |
| redis.master.port | int | `6379` | | | redis.master.port | int | `6379` | |
| redis.usePassword | bool | `false` | | | redis.usePassword | bool | `false` | |
| secret.authToken | string | `"1SCf0ov3Nm544Td2oZ0gXSrsNx5XhMWdVlKz1tOgcx158bD5RV"` | |
| secret.credentials.apiserver.accessKey | string | `"5442F3443MJMORWZA3ZH"` | |
| secret.credentials.apiserver.secretKey | string | `"BxapIRo9ZINi8x25CRxz8Wdmr2pQjzuWVB4PNASZqCtTyWgWVQ"` | |
| secret.credentials.tests.accessKey | string | `"ENP39EQM4SLACGD5FXB7"` | |
| secret.credentials.tests.secretKey | string | `"lPcm0imbcBZ8mwgO7tpadutiS3gnJD05x9j7afwXPS35IKbpiQ"` | |
| secret.httpSession | string | `"9Tw20RbhJ1bLBiHEOWXvhplKGUbTgLzAtwFN2oLQvWwS0uRpD5"` | |
| webserver.affinity | object | `{}` | | | webserver.affinity | object | `{}` | |
| webserver.extraEnvs | list | `[]` | | | webserver.extraEnvs | list | `[]` | |
| webserver.image.pullPolicy | string | `"IfNotPresent"` | | | webserver.image.pullPolicy | string | `"IfNotPresent"` | |

View File

@ -17,8 +17,9 @@ spec:
{{- include "clearml.selectorLabelsAgent" $ | nindent 6 }} {{- include "clearml.selectorLabelsAgent" $ | nindent 6 }}
template: template:
metadata: metadata:
{{- with .podAnnotations }}
annotations: annotations:
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") $ | sha256sum }}
{{- with .podAnnotations }}
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels:

View File

@ -12,8 +12,9 @@ spec:
{{- include "clearml.selectorLabelsAgentServices" . | nindent 6 }} {{- include "clearml.selectorLabelsAgentServices" . | nindent 6 }}
template: template:
metadata: metadata:
{{- with .Values.agentservices.podAnnotations }}
annotations: annotations:
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
{{- with .Values.agentservices.podAnnotations }}
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels:

View File

@ -11,8 +11,9 @@ spec:
{{- include "clearml.selectorLabelsApiServer" . | nindent 6 }} {{- include "clearml.selectorLabelsApiServer" . | nindent 6 }}
template: template:
metadata: metadata:
{{- with .Values.apiserver.podAnnotations }}
annotations: annotations:
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
{{- with .Values.apiserver.podAnnotations }}
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels:

View File

@ -2,10 +2,10 @@ apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
name: clearml-conf name: clearml-conf
data: stringData:
apiserver_key: NTQ0MkYzNDQzTUpNT1JXWkEzWkg= apiserver_key: {{ .Values.secret.credentials.apiserver.accessKey }}
apiserver_secret: QnhhcElSbzlaSU5pOHgyNUNSeHo4V2RtcjJwUWp6dVdWQjRQTkFTWnFDdFR5V2dXVlE= apiserver_secret: {{ .Values.secret.credentials.apiserver.secretKey }}
http_session: OVR3MjBSYmhKMWJMQmlIRU9XWHZocGxLR1ViVGdMekF0d0ZOMm9MUXZXd1MwdVJwRDU= http_session: {{ .Values.secret.httpSession }}
auth_token: MVNDZjBvdjNObTU0NFRkMm9aMGdYU3JzTng1WGhNV2RWbEt6MXRPZ2N4MTU4YkQ1UlY= auth_token: {{ .Values.secret.authToken }}
tests_user_key: RU5QMzlFUU00U0xBQ0dENUZYQjc= tests_user_key: {{ .Values.secret.credentials.tests.accessKey }}
tests_user_secret: bFBjbTBpbWJjQlo4bXdnTzd0cGFkdXRpUzNnbkpEMDV4OWo3YWZ3WFBTMzVJS2JwaVE= tests_user_secret: {{ .Values.secret.credentials.tests.secretKey }}

View File

@ -14,6 +14,17 @@ ingress:
hostName: "files.clearml.127-0-0-1.nip.io" hostName: "files.clearml.127-0-0-1.nip.io"
tlsSecretName: "" tlsSecretName: ""
secret:
httpSession: "9Tw20RbhJ1bLBiHEOWXvhplKGUbTgLzAtwFN2oLQvWwS0uRpD5"
authToken: "1SCf0ov3Nm544Td2oZ0gXSrsNx5XhMWdVlKz1tOgcx158bD5RV"
credentials:
apiserver:
accessKey: "5442F3443MJMORWZA3ZH"
secretKey: "BxapIRo9ZINi8x25CRxz8Wdmr2pQjzuWVB4PNASZqCtTyWgWVQ"
tests:
accessKey: "ENP39EQM4SLACGD5FXB7"
secretKey: "lPcm0imbcBZ8mwgO7tpadutiS3gnJD05x9j7afwXPS35IKbpiQ"
apiserver: apiserver:
prepopulateEnabled: "true" prepopulateEnabled: "true"
prepopulateZipFiles: "/opt/clearml/db-pre-populate" prepopulateZipFiles: "/opt/clearml/db-pre-populate"