|
1 | 1 | {{- $v := .Values }}
|
2 | 2 | {{- $h := $v.apps.harbor }}
|
| 3 | +{{- $db := $v.databases.harbor }} |
3 | 4 | {{- $hp := $h | get "persistence" dict }}
|
4 | 5 | {{- $harborDomain := printf "harbor.%s" $v.cluster.domainSuffix }}
|
5 | 6 | {{- $notaryDomain := printf "notary.%s" $v.cluster.domainSuffix }}
|
|
8 | 9 | {{- $externalUrl := printf "https://%s" $harborDomain }}
|
9 | 10 | {{- $tag := $h | get "image.tag" "v2.6.4" }}
|
10 | 11 | {{/*The cloudNativeDb operator is responsible for creating the secret*/}}
|
11 |
| -{{- $databaseExistingSecret := printf "%s-app" $h.database.name }} |
12 |
| -{{- $databaseHost := printf "%s-rw.harbor.svc.cluster.local" $h.database.name }} |
13 | 12 |
|
14 | 13 | externalURL: {{ $externalUrl }}
|
15 | 14 | fullnameOverride: harbor
|
@@ -64,50 +63,14 @@ core:
|
64 | 63 | xsrfKey: {{ $h | get "core.xsrfKey" nil }}
|
65 | 64 |
|
66 | 65 | database:
|
67 |
| - type: {{ $h.database.type }} |
68 |
| - {{- if eq $h.database.type "internal" }} |
69 |
| - internal: |
70 |
| - priorityClassName: otomi-critical |
71 |
| - image: |
72 |
| - tag: {{ $tag }} |
73 |
| - initContainer: |
74 |
| - migrator: |
75 |
| - resources: |
76 |
| - limits: |
77 |
| - cpu: 100m |
78 |
| - memory: 512Mi |
79 |
| - requests: |
80 |
| - cpu: 50m |
81 |
| - memory: 256Mi |
82 |
| - permissions: |
83 |
| - resources: |
84 |
| - limits: |
85 |
| - cpu: 100m |
86 |
| - memory: 512Mi |
87 |
| - requests: |
88 |
| - cpu: 50m |
89 |
| - memory: 256Mi |
90 |
| - resources: |
91 |
| - {{- with $h | get "resources.database" nil }} |
92 |
| - {{- toYaml . | nindent 6 }} |
93 |
| - {{- else }} |
94 |
| - limits: |
95 |
| - cpu: 100m |
96 |
| - memory: 512Mi |
97 |
| - requests: |
98 |
| - cpu: 50m |
99 |
| - memory: 256Mi |
100 |
| - {{- end }} |
101 |
| - password: {{ $h.databasePassword }} |
102 |
| - {{- else }} |
| 66 | + type: external |
103 | 67 | external:
|
104 | 68 | # erase default password value from the Harbor Helm chart
|
105 | 69 | password: null
|
106 |
| - coreDatbase: {{ $h.database.coreDatabase }} |
107 |
| - username: {{ $h.database.user }} |
108 |
| - host: {{ $databaseHost }} |
109 |
| - existingSecret: {{ $databaseExistingSecret }} |
110 |
| - {{- end }} |
| 70 | + coreDatabase: {{ $db.coreDatabase }} |
| 71 | + username: harbor |
| 72 | + host: harbor-otomi-db-rw.harbor.svc.cluster.local |
| 73 | + existingSecret: harbor-otomi-db-app |
111 | 74 | podAnnotations:
|
112 | 75 | # this exception allows the chmod fix to pass, which needs root access:
|
113 | 76 | policy.otomi.io/ignore.data-migrator: psp-allowed-users
|
|
0 commit comments