5 Commits

Author SHA1 Message Date
23adcf6472 chore: bump version up to 2.33.0
All checks were successful
Release Chart / release (push) Successful in 46s
2023-08-30 20:00:10 +03:00
f6b709fba1 feat: change drone to gitea actions
All checks were successful
Release Chart / release (push) Successful in 13s
2023-08-28 01:10:32 +03:00
2324e7d6e2 cs: fix
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-17 17:00:07 +03:00
2f2043e915 ci: use helm plugin
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-15 00:03:04 +03:00
a801fd1480 Fix include number of args
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-12-06 16:03:53 +03:00
10 changed files with 127 additions and 147 deletions

View File

@ -1,49 +0,0 @@
---
kind: pipeline
type: docker
name: default
trigger:
event:
- push
- tag
steps:
- name: lint
image: cr.grachevko.ru/docker.io/alpine/helm:latest
pull: always
commands:
- helm lint .
- name: version
image: cr.grachevko.ru/docker.io/mikefarah/yq:latest
pull: always
user: root
commands:
- yq -i '.version = "'$DRONE_TAG'"' Chart.yaml
- cat Chart.yaml
depends_on:
- lint
when:
event:
- tag
- name: release
image: cr.grachevko.ru/docker.io/alpine/helm:latest
pull: always
commands:
- helm dependency build
- helm plugin install https://github.com/chartmuseum/helm-push
- helm repo add hasura $HELM_REPO --username $HELM_REPO_USERNAME --password $HELM_REPO_PASSWORD
- helm cm-push . $HELM_REPO
environment:
HELM_REPO: https://harbor.grachevko.ru/chartrepo/hasura
HELM_REPO_USERNAME:
from_secret: HELM_REPO_USERNAME
HELM_REPO_PASSWORD:
from_secret: HELM_REPO_PASSWORD
depends_on:
- version
when:
event:
- tag

View File

@ -0,0 +1,29 @@
name: Release Chart
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
env:
REGISTRY: harbor.grachevko.ru
steps:
- uses: actions/checkout@v3
- uses: yokawasa/action-setup-kube-tools@v0.9.3
with:
setup-tools: helm
- name: deps and lint
run: |
helm dependency update
helm lint --strict .
- name: build
run: helm package --version ${{ gitea.ref_name }} .
- name: publish
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | helm registry login ${{ env.REGISTRY }} --username "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
helm push ./*.tgz oci://harbor.grachevko.ru/${{ gitea.repository }}

View File

@ -3,10 +3,10 @@ name: hasura
description: A Helm chart for Kubernetes
type: application
version: 0.2.6
appVersion: 2.16.0
appVersion: 2.33.0
icon: https://raw.githubusercontent.com/hasura/graphql-engine/master/assets/brand/powered_by_hasura_primary_lightbg.svg
maintainers:
- email: me@grachevko.ru
name: Konstantin Grachev
- email: me@grachevko.ru
name: Konstantin Grachev
sources:
- https://git.grachevko.ru/hasura/chart
- https://git.grachevko.ru/hasura/chart

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

View File

@ -10,7 +10,7 @@ image:
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
pullSecrets: [ ]
pullSecrets: []
extraEnvVarsSecret: ""
@ -20,7 +20,7 @@ migrations:
registry: *registry
repository: ""
tag: ""
pullSecrets: [ ]
pullSecrets: []
path: /data
nameOverride: ""
@ -30,22 +30,22 @@ serviceAccount:
# Specifies whether a service account should be created
create: false
# Annotations to add to the service account
annotations: { }
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: { }
podAnnotations: {}
podSecurityContext: { }
podSecurityContext: {}
# fsGroup: 2000
securityContext: { }
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsNonRoot: true
# runAsUser: 1000
service:
@ -55,20 +55,20 @@ service:
ingress:
enabled: false
className: ""
annotations: { }
# kubernetes.io/ingress.class: nginx
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: [ ]
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: { }
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
@ -77,7 +77,7 @@ resources: { }
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# cpu: 100m
# memory: 128Mi
autoscaling:
@ -87,8 +87,8 @@ autoscaling:
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: { }
nodeSelector: {}
tolerations: [ ]
tolerations: []
affinity: { }
affinity: {}