Skip to content

Commit

Permalink
Add lifecycle in nginx, portal, exporter, jobservice, registry, redis…
Browse files Browse the repository at this point in the history
…, trivy

Signed-off-by: derek <[email protected]>
  • Loading branch information
derekcha committed Apr 18, 2024
1 parent a04837f commit d0cee30
Show file tree
Hide file tree
Showing 9 changed files with 381 additions and 333 deletions.
673 changes: 340 additions & 333 deletions README.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions templates/exporter/exporter-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ spec:
port: {{ .Values.metrics.exporter.port }}
initialDelaySeconds: 30
periodSeconds: 10
{{- with .Values.exporter.lifecycle }}
lifecycle:
{{ toYaml . | indent 10 }}
{{- end }}
args: ["-log-level", "{{ .Values.logLevel }}"]
envFrom:
- configMapRef:
Expand Down
4 changes: 4 additions & 0 deletions templates/jobservice/jobservice-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ spec:
port: {{ template "harbor.jobservice.containerPort" . }}
initialDelaySeconds: 20
periodSeconds: 10
{{- with .Values.jobservice.lifecycle }}
lifecycle:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.jobservice.resources }}
resources:
{{ toYaml .Values.jobservice.resources | indent 10 }}
Expand Down
4 changes: 4 additions & 0 deletions templates/nginx/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ spec:
port: {{ .port }}
initialDelaySeconds: 1
periodSeconds: 10
{{- with .Values.nginx.lifecycle }}
lifecycle:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.nginx.resources }}
resources:
{{ toYaml .Values.nginx.resources | indent 10 }}
Expand Down
4 changes: 4 additions & 0 deletions templates/portal/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ spec:
port: {{ template "harbor.portal.containerPort" . }}
initialDelaySeconds: 1
periodSeconds: 10
{{- with .Values.portal.lifecycle }}
lifecycle:
{{ toYaml . | indent 10 }}
{{- end }}
ports:
- containerPort: {{ template "harbor.portal.containerPort" . }}
volumeMounts:
Expand Down
4 changes: 4 additions & 0 deletions templates/redis/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ spec:
port: 6379
initialDelaySeconds: 1
periodSeconds: 10
{{- with .Values.redis.internal.lifecycle }}
lifecycle:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.redis.internal.resources }}
resources:
{{ toYaml .Values.redis.internal.resources | indent 10 }}
Expand Down
8 changes: 8 additions & 0 deletions templates/registry/registry-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ spec:
port: {{ template "harbor.registry.containerPort" . }}
initialDelaySeconds: 1
periodSeconds: 10
{{- with .Values.registry.registry.lifecycle }}
lifecycle:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.registry.registry.resources }}
resources:
{{ toYaml .Values.registry.registry.resources | indent 10 }}
Expand Down Expand Up @@ -223,6 +227,10 @@ spec:
port: {{ template "harbor.registryctl.containerPort" . }}
initialDelaySeconds: 1
periodSeconds: 10
{{- with .Values.registry.controller.lifecycle }}
lifecycle:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.registry.controller.resources }}
resources:
{{ toYaml .Values.registry.controller.resources | indent 10 }}
Expand Down
4 changes: 4 additions & 0 deletions templates/trivy/trivy-sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ spec:
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
{{- with .Values.trivy.lifecycle }}
lifecycle:
{{ toYaml . | indent 10 }}
{{- end }}
resources:
{{ toYaml .Values.trivy.resources | indent 12 }}
{{- if or (or .Values.internalTLS.enabled .Values.caBundleSecretName) (or (not .Values.persistence.enabled) $trivy.existingClaim) }}
Expand Down
9 changes: 9 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ nginx:
extraEnvVars: []
nodeSelector: {}
tolerations: []
lifecycle: {}
affinity: {}
# Spread Pods across failure-domains like regions, availability zones or nodes
topologySpreadConstraints: []
Expand Down Expand Up @@ -528,6 +529,7 @@ portal:
extraEnvVars: []
nodeSelector: {}
tolerations: []
lifecycle: {}
affinity: {}
# Spread Pods across failure-domains like regions, availability zones or nodes
topologySpreadConstraints: []
Expand Down Expand Up @@ -642,6 +644,7 @@ jobservice:
extraEnvVars: []
nodeSelector: {}
tolerations: []
lifecycle : {}
affinity: {}
# Spread Pods across failure-domains like regions, availability zones or nodes
topologySpreadConstraints:
Expand Down Expand Up @@ -689,6 +692,7 @@ registry:
# requests:
# memory: 256Mi
# cpu: 100m
lifecycle: {}
extraEnvVars: []
controller:
image:
Expand All @@ -698,6 +702,7 @@ registry:
# requests:
# memory: 256Mi
# cpu: 100m
lifecycle: {}
extraEnvVars: []
# set the service account to be used, default if left empty
serviceAccountName: ""
Expand All @@ -707,6 +712,7 @@ registry:
revisionHistoryLimit: 10
nodeSelector: {}
tolerations: []
lifecycle: {}
affinity: {}
# Spread Pods across failure-domains like regions, availability zones or nodes
topologySpreadConstraints: []
Expand Down Expand Up @@ -785,6 +791,7 @@ trivy:
nodeSelector: {}
tolerations: []
affinity: {}
lifecycle: {}
# Spread Pods across failure-domains like regions, availability zones or nodes
topologySpreadConstraints: []
# - maxSkew: 1
Expand Down Expand Up @@ -938,6 +945,7 @@ redis:
extraEnvVars: []
nodeSelector: {}
tolerations: []
lifecycle: {}
affinity: {}
## The priority class to run the pod as
priorityClassName:
Expand Down Expand Up @@ -997,6 +1005,7 @@ exporter:
podLabels: {}
nodeSelector: {}
tolerations: []
lifecycle: {}
affinity: {}
# Spread Pods across failure-domains like regions, availability zones or nodes
topologySpreadConstraints: []
Expand Down

0 comments on commit d0cee30

Please sign in to comment.