Skip to content

Commit

Permalink
add POSTGRES_SECRETS_TEMPLATE in container ENV (#718)
Browse files Browse the repository at this point in the history
* fix postgres secrets (#717)

Signed-off-by: Henry <kangkai-iri@360.cn>

* fix postgres secrets

Signed-off-by: Henry <kangkai-iri@360.cn>

Update charts/harbor-operator/values.yaml

Signed-off-by: Henry <kangkai-iri@360.cn>

Co-authored-by: cndoit18 <cndoit18@outlook.com>

Update config/helm/deployment/patch_deployment_config.yaml

Signed-off-by: Henry <kangkai-iri@360.cn>

Co-authored-by: cndoit18 <cndoit18@outlook.com>

fix postgres secrets

Signed-off-by: Henry <kangkai-iri@360.cn>

* fix postgres secrets

Signed-off-by: Henry <kangkai-iri@360.cn>

* fix postgres secrets

Signed-off-by: Henry <kangkai-iri@360.cn>

Co-authored-by: Henry <kangkai-iri@360.cn>
  • Loading branch information
HenryKamg and Henry committed Aug 11, 2021
1 parent 36567d3 commit d54eaeb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/harbor-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Deploy Harbor Operator
| podAnnotations | object | `{}` | Additional annotations to add to the controller Pods |
| podLabels | object | `{}` | Additional labels to add to the controller Pods |
| podSecurityContext | object | `{"runAsNonRoot":true,"runAsUser":65532}` | Expects input structure as per specification <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podsecuritycontext-v1-core> For example: `{ "fsGroup": 2000, "runAsUser": 1000, "runAsNonRoot": true }` |
| postgresOperator.configKubernetes.secret_name_template | string | `"{username}.{cluster}.credentials"` | |
| priorityClassName | string | `""` | priority class to be used for the harbor-operator pods |
| rbac.create | bool | `true` | Whether to install Role Based Access Control |
| replicaCount | int | `1` | Number of replicas for the controller |
Expand Down
2 changes: 2 additions & 0 deletions charts/harbor-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ spec:
command:
- /manager
env:
- name: POSTGRES_SECRETS_TEMPLATE
value: {{.Values.postgresOperator.configKubernetes.secret_name_template|quote}}
- name: CONFIGURATION_FROM
value: env,file:/etc/harbor-operator/config.yaml
- name: CLASSNAME
Expand Down
4 changes: 4 additions & 0 deletions charts/harbor-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ imagePullSecrets: []
# priorityClassName -- priority class to be used for the harbor-operator pods
priorityClassName: ""

postgresOperator:
configKubernetes:
secret_name_template: "{username}.{cluster}.credentials"

rbac:
# rbac.create -- Whether to install Role Based Access Control
create: true
Expand Down
2 changes: 2 additions & 0 deletions config/helm/deployment/patch_deployment_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ spec:
containers:
- name: manager
env:
- name: POSTGRES_SECRETS_TEMPLATE
value: '{{.Values.postgresOperator.configKubernetes.secret_name_template|quote}}'
- name: CONFIGURATION_FROM
value: 'env,file:/etc/harbor-operator/config.yaml'
- name: CLASSNAME
Expand Down

0 comments on commit d54eaeb

Please sign in to comment.