Skip to content

Commit

Permalink
update notes, default values, new TLS configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhnc2 committed May 4, 2024
1 parent 40ce7a5 commit f70be04
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/registry/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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.1.2
version: 0.1.3

# 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
7 changes: 7 additions & 0 deletions charts/registry/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Congratulated! Your registry server is hosted at:
http{{ if $.Values.registry.tls.enabled }}s{{ end }}://{{ $.Values.registry.host | default "registry.local" }}

You have to update your Hosts/DNS to make it works.

After that, you can now use: docker login {{ $.Values.registry.host | default "registry.local" }}
then push a new image to it. Cheers
2 changes: 1 addition & 1 deletion charts/registry/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ spec:
livenessProbe:
tcpSocket:
port: 6379
-readinessProbe:
readinessProbe:
tcpSocket:
port: 6379
{{- end }}
12 changes: 11 additions & 1 deletion charts/registry/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,20 @@ kind: Ingress
metadata:
name: {{ $fullName }}-ingress
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: {{.Values.registry.maxUploadSize | squote}}
nginx.ingress.kubernetes.io/proxy-body-size: {{.Values.registry.maxUploadSize | default "30m" | squote}}
labels:
name: {{ $fullName }}-ingress
spec:
{{- if .Values.registry.tls.enabled }}
tls:
- hosts:
- {{ .Values.registry.host | default "registry.local" | quote }}
{{- if not .Values.registry.tls.secretName }}
secretName: {{ $fullName }}-tls
{{- else -}}
secretName: {{ .Values.registry.tls.secretName }}
{{ end -}}
{{- end }}
rules:
- host: {{ .Values.registry.host | default "registry.local" | quote }}
http:
Expand Down
18 changes: 16 additions & 2 deletions charts/registry/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,19 @@ metadata:
name: {{ $fullName}}-basic-auth
type: kubernetes.io/basic-auth
data:
username: {{ .Values.registry.username | default "YWRtaW4K" | b64enc }}
password: {{ .Values.registry.password | default "YWRtaW4K" | b64enc }}
username: {{ .Values.registry.username | default "admin" | b64enc }}
password: {{ .Values.registry.password | default "admin" | b64enc }}

---
{{- if not .Values.registry.tls.secretName }}
{{- if .Values.registry.tls.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ $fullName}}-tls
type: kubernetes.io/tls
data:
tls.crt: {{ .Values.registry.tls.cert | b64enc }}
tls.key: {{ .Values.registry.tls.key | b64enc }}
{{- end}}
{{- end}}
22 changes: 16 additions & 6 deletions charts/registry/values.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
redis:
enabled: true
redis: {}
# enabled: true
# replicaCount: 1
# memoryLimit: 2Gi
# cpuLimit: "1"

registry:
replicaCount: 1
registry:
# replicaCount: 1
# username:
# password:
maxUploadSize: 30m # maximum upload file
host: registry.local
# maxUploadSize: 30m # maximum upload file
# host: registry.local
# garbageCron: "* * * * *" # set the time to run docker image garbage collection, default is run daily at 00:00 AM
# memoryLimit: 2Gi
# cpuLimit: "1"
tls: {}
# enabled: true
# secretName: ""
# cert: |
# -----BEGIN CERTIFICATE-----
# -----END CERTIFICATE-----
# key: |
# -----BEGIN PRIVATE KEY-----
# -----END PRIVATE KEY-----

0 comments on commit f70be04

Please sign in to comment.