cs: fix
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-03-17 17:00:07 +03:00
parent 2f2043e915
commit 2324e7d6e2
9 changed files with 112 additions and 112 deletions

View File

@ -28,29 +28,29 @@ spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ include "hasura.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
image: {{ include "hasura.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
{{- if .Values.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.extraEnvVarsSecret }}
{{- end }}
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: http
readinessProbe:
httpGet:
path: /healthz
port: http
resources:
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: http
readinessProbe:
httpGet:
path: /healthz
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:

View File

@ -14,15 +14,15 @@ spec:
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View File

@ -29,30 +29,30 @@ spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- hosts:
{{- range .hosts }}
- {{ . | quote }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ default "ImplementationSpecific" .pathType }}
backend:
- path: {{ .path }}
pathType: {{ default "ImplementationSpecific" .pathType }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -22,32 +22,32 @@ spec:
{{- end }}
restartPolicy: Never
volumes:
- name: data
emptyDir: { }
- name: data
emptyDir: {}
initContainers:
- name: copy
image: "{{ .Values.migrations.image.registry }}/{{ .Values.migrations.image.repository }}:{{ .Values.migrations.image.tag | default "latest" }}"
command: ["/bin/sh", "-c", "cp -R /{{ .Values.migrations.image.path }}/* /shared-data/"]
workingDir: /data
volumeMounts:
- name: data
mountPath: /shared-data
- name: copy
image: "{{ .Values.migrations.image.registry }}/{{ .Values.migrations.image.repository }}:{{ .Values.migrations.image.tag | default "latest" }}"
command: ["/bin/sh", "-c", "cp -R /{{ .Values.migrations.image.path }}/* /shared-data/"]
workingDir: /data
volumeMounts:
- name: data
mountPath: /shared-data
containers:
- name: migrate
image: {{ include "hasura.image" . }}
command: [ "/bin/sh", "-c" ]
args:
- hasura-cli deploy
workingDir: /data
env:
- name: HASURA_GRAPHQL_ENDPOINT
value: "http://{{ include "hasura.fullname" . }}"
envFrom:
- name: migrate
image: {{ include "hasura.image" . }}
command: ["/bin/sh", "-c"]
args:
- hasura-cli deploy
workingDir: /data
env:
- name: HASURA_GRAPHQL_ENDPOINT
value: "http://{{ include "hasura.fullname" . }}"
envFrom:
{{- if .Values.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.extraEnvVarsSecret }}
{{- end }}
volumeMounts:
- name: data
mountPath: /data
volumeMounts:
- name: data
mountPath: /data
{{- end }}

View File

@ -7,9 +7,9 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "hasura.selectorLabels" . | nindent 4 }}

View File

@ -8,8 +8,8 @@ metadata:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: [ 'wget' ]
args: [ '{{ include "hasura.fullname" . }}:{{ .Values.service.port }}' ]
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "hasura.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never