Skip to content

Commit

Permalink
feat: add init containers
Browse files Browse the repository at this point in the history
Signed-off-by: Taehyun Kim <kgyoo8232@gmail.com>
  • Loading branch information
kimxogus committed Feb 27, 2023
1 parent 5bcceb3 commit 0457580
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -215,6 +215,7 @@ The following table lists the configurable parameters of the Harbor chart and th
| `portal.affinity` | Node/Pod affinities | `{}` |
| `portal.podAnnotations` | Annotations to add to the portal pod | `{}` |
| `portal.priorityClassName` | The priority class to run the pod as | |
| `portal.initContainers` | Init containers to be run before the controller's container starts. | `[]` |
| **Core** | | |
| `core.image.repository` | Repository for Harbor core image | `goharbor/harbor-core` |
| `core.image.tag` | Tag for Harbor core image | `dev` |
Expand All @@ -226,6 +227,7 @@ The following table lists the configurable parameters of the Harbor chart and th
| `core.nodeSelector` | Node labels for pod assignment | `{}` |
| `core.tolerations` | Tolerations for pod assignment | `[]` |
| `core.affinity` | Node/Pod affinities | `{}` |
| `core.initContainers` | Init containers to be run before the controller's container starts. | `[]` |
| `core.podAnnotations` | Annotations to add to the core pod | `{}` |
| `core.serviceAnnotations` | Annotations to add to the core service | `{}` |
| `core.secret` | Secret is used when core server communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | |
Expand All @@ -251,6 +253,7 @@ The following table lists the configurable parameters of the Harbor chart and th
| `jobservice.affinity` | Node/Pod affinities | `{}` |
| `jobservice.podAnnotations` | Annotations to add to the jobservice pod | `{}` |
| `jobservice.priorityClassName` | The priority class to run the pod as | |
| `jobservice.initContainers` | Init containers to be run before the controller's container starts. | `[]` |
| `jobservice.secret` | Secret is used when job service communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | |
| **Registry** | | |
| `registry.registry.image.repository` | Repository for registry image | `goharbor/registry-photon` |
Expand Down Expand Up @@ -278,6 +281,7 @@ The following table lists the configurable parameters of the Harbor chart and th
| `registry.upload_purging.age` | Remove files in _upload directories which exist for a period of time, default is one week. | `168h` |
| `registry.upload_purging.interval` | The interval of the purge operations | `24h` |
| `registry.upload_purging.dryrun` | If true, enable dryrun for purging _upload, default false | `false` |
| `registry.initContainers` | Init containers to be run before the controller's container starts. | `[]` |
| **[Trivy][trivy]** | | |
| `trivy.enabled` | The flag to enable Trivy scanner | `true` |
| `trivy.image.repository` | Repository for Trivy adapter image | `goharbor/trivy-adapter-photon` |
Expand Down
4 changes: 4 additions & 0 deletions templates/core/core-dpl.yaml
Expand Up @@ -42,6 +42,10 @@ spec:
{{- end }}
automountServiceAccountToken: {{ .Values.core.automountServiceAccountToken | default false }}
terminationGracePeriodSeconds: 120
{{- with .Values.core.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: core
image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }}
Expand Down
4 changes: 4 additions & 0 deletions templates/jobservice/jobservice-dpl.yaml
Expand Up @@ -48,6 +48,10 @@ spec:
{{- end }}
automountServiceAccountToken: {{ .Values.jobservice.automountServiceAccountToken | default false }}
terminationGracePeriodSeconds: 120
{{- with .Values.jobservice.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: jobservice
image: {{ .Values.jobservice.image.repository }}:{{ .Values.jobservice.image.tag }}
Expand Down
4 changes: 4 additions & 0 deletions templates/portal/deployment.yaml
Expand Up @@ -38,6 +38,10 @@ spec:
serviceAccountName: {{ .Values.portal.serviceAccountName }}
{{- end }}
automountServiceAccountToken: {{ .Values.portal.automountServiceAccountToken | default false }}
{{- with .Values.portal.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: portal
image: {{ .Values.portal.image.repository }}:{{ .Values.portal.image.tag }}
Expand Down
4 changes: 4 additions & 0 deletions templates/registry/registry-dpl.yaml
Expand Up @@ -51,6 +51,10 @@ spec:
{{- end }}
automountServiceAccountToken: {{ .Values.registry.automountServiceAccountToken | default false }}
terminationGracePeriodSeconds: 120
{{- with .Values.registry.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: registry
image: {{ .Values.registry.registry.image.repository }}:{{ .Values.registry.registry.image.tag }}
Expand Down
28 changes: 28 additions & 0 deletions values.yaml
Expand Up @@ -440,6 +440,13 @@ portal:
podAnnotations: {}
## The priority class to run the pod as
priorityClassName:
# containers to be run before the controller's container starts.
initContainers: []
# Example:
#
# - name: wait
# image: busybox
# command: [ 'sh', '-c', "sleep 20" ]

core:
image:
Expand All @@ -464,6 +471,13 @@ core:
affinity: {}
## Additional deployment annotations
podAnnotations: {}
# containers to be run before the controller's container starts.
initContainers: []
# Example:
#
# - name: wait
# image: busybox
# command: [ 'sh', '-c', "sleep 20" ]
## Additional service annotations
serviceAnnotations: {}
# Secret is used when core server communicates with other components.
Expand Down Expand Up @@ -528,6 +542,13 @@ jobservice:
secret: ""
## The priority class to run the pod as
priorityClassName:
# containers to be run before the controller's container starts.
initContainers: []
# Example:
#
# - name: wait
# image: busybox
# command: [ 'sh', '-c', "sleep 20" ]

registry:
# set the service account to be used, default if left empty
Expand Down Expand Up @@ -594,6 +615,13 @@ registry:
# the interval of the purge operations
interval: 24h
dryrun: false
# containers to be run before the controller's container starts.
initContainers: []
# Example:
#
# - name: wait
# image: busybox
# command: [ 'sh', '-c', "sleep 20" ]

trivy:
# enabled the flag to enable Trivy scanner
Expand Down

0 comments on commit 0457580

Please sign in to comment.