Skip to content

Commit

Permalink
Merge pull request #535 from sapisuper/master
Browse files Browse the repository at this point in the history
support helm-chart using config file
  • Loading branch information
sseide authored Oct 10, 2023
2 parents 683d354 + b7297dc commit 582cddd
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 1 deletion.
101 changes: 101 additions & 0 deletions k8s/helm-chart/example-manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: redis-commander
spec:
releaseName: redis-commander
values:
image:
repository: ghcr.io/joeferner/redis-commander
tag: latest
connections:
local_production_json: >-
{
"noSave": false,
"noLogData": false,
"ui": {
"sidebarWidth": 250,
"locked": false,
"cliHeight": 320,
"cliOpen": false,
"foldingChar": ":",
"jsonViewAsDefault": "none",
"binaryAsHex": true,
"maxHashFieldSize": 0
},
"redis": {
"readOnly": false,
"flushOnImport": false,
"useScan": true,
"scanCount": 100,
"rootPattern": "*",
"connectionName": "redis-commander",
"defaultLabel": "local",
"defaultSentinelGroup": "mymaster"
},
"server": {
"address": "0.0.0.0",
"port": 8081,
"urlPrefix": "",
"signinPath": "signin",
"httpAuthHeaderName": "Authorization",
"trustProxy": false,
"clientMaxBodySize": "100kb",
"httpAuth": {
"username": "",
"password": "",
"passwordHash": "",
"comment": "to enable http auth set username and either password or passwordHash",
"jwtSecret": ""
}
},
"sso": {
"enabled": false,
"jwtSharedSecret": "",
"jwtAlgorithms": ["HS256", "HS384", "HS512"],
"allowedIssuer": "",
"audience": "",
"subject": ""
},
"connections": [
{
"label": "redis-sentinel-service-x",
"sentinels": "19.94.12.11:26379",
"sentinelName": "mymaster",
"dbIndex": 0
},
{
"label": "redis-sentinel-service-y",
"sentinels": "19.94.12.11:26379",
"sentinelName": "mymaster",
"dbIndex": 0
},
{
"label": "redis-server-service-xz",
"host": "19.94.12.11",
"port": "6379",
"dbIndex": 0
},
{
"label": "redis-server-service-yz",
"host": "19.94.12.11",
"port": "6379",
"dbIndex": 0
}
]
}
volumeMounts:
- name: local-production
mountPath: /redis-commander/config
volumes:
- name: local-production
configMap:
name: redis-commander-configmap
rollback:
disableWait: true
cleanupOnFail: true
upgrade:
cleanupOnFail: true
remediation:
retries: 3
maxHistory: 5
2 changes: 1 addition & 1 deletion k8s/helm-chart/redis-commander/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.0
version: 0.3.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 6 additions & 0 deletions k8s/helm-chart/redis-commander/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-configmap
data:
local-production.json: {{ .Values.connections.local_production_json | toJson }}
8 changes: 8 additions & 0 deletions k8s/helm-chart/redis-commander/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ spec:
{{- end }}
- name: K8S_SIGTERM
value: "1"
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | default "" | nindent 12 }}
{{- end }}
livenessProbe:
httpGet:
path: /favicon.png
Expand All @@ -84,6 +88,10 @@ spec:
timeoutSeconds: 5
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | default "" | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
9 changes: 9 additions & 0 deletions k8s/helm-chart/redis-commander/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@
},
"tolerations": {
"type": "array"
},
"connections": {
"type": "object"
},
"volumeMounts": {
"type": "array"
},
"volumes": {
"type": "array"
}
}
}
6 changes: 6 additions & 0 deletions k8s/helm-chart/redis-commander/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,9 @@ nodeSelector: {}
tolerations: []

affinity: {}

connections: {}

volumeMounts: []

volumes: []

0 comments on commit 582cddd

Please sign in to comment.