-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(helm,docker-compose): add registry service (#435)
Because - Instill core will be incorporating a image registry service This commit - add `docker registry` service in docker-composes deployment - add `docker registry` service in helm deployment Resolves INS-3818 Resolves INS-3819 Resolves INS-3934
- Loading branch information
Showing
16 changed files
with
683 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "core.registry" . }} | ||
labels: | ||
{{- include "core.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: registry | ||
data: | ||
config.yaml: |+ | ||
version: {{ .Values.registry.config.version }} | ||
log: | ||
{{- toYaml .Values.registry.config.log | nindent 6 }} | ||
storage: | ||
{{- toYaml .Values.registry.config.storage | nindent 6 }} | ||
http: | ||
{{- toYaml .Values.registry.config.http | nindent 6 }} | ||
redis: | ||
{{- toYaml .Values.registry.config.redis | nindent 6 }} | ||
health: | ||
storagedriver: | ||
enabled: true | ||
interval: 10s | ||
threshold: 3 | ||
tcp: | ||
- addr: {{ template "core.redis.addr" . }} | ||
timeout: 3s | ||
interval: 30s | ||
threshold: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{{- if .Values.registry.garbageCollect.enabled }} | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: {{ template "core.registry" . }}-garbage-collector | ||
labels: | ||
{{- include "core.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: registry | ||
spec: | ||
concurrencyPolicy: Forbid | ||
schedule: {{ .Values.registry.garbageCollect.schedule | quote }} | ||
jobTemplate: | ||
metadata: | ||
labels: | ||
{{- include "core.matchLabels" . | nindent 8 }} | ||
app.kubernetes.io/component: registry | ||
annotations: | ||
checksum/config: {{ include (print $.Template.BasePath "/registry/configmap.yaml") . | sha256sum }} | ||
{{- with .Values.registry.podAnnotations }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
template: | ||
spec: | ||
{{- if .Values.registry.serviceAccountName }} | ||
serviceAccountName: {{ .Values.registry.serviceAccountName }} | ||
{{- end }} | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
securityContext: | ||
runAsUser: 65534 | ||
runAsGroup: 65534 | ||
fsGroup: 65534 | ||
containers: | ||
- name: garbage-collect | ||
image: {{ .Values.registry.image.repository }}:{{ .Values.registry.image.tag }} | ||
imagePullPolicy: {{ .Values.registry.image.pullPolicy }} | ||
command: | ||
- /bin/registry | ||
- garbage-collect | ||
- --delete-untagged={{ .Values.registry.garbageCollect.deleteUntagged }} | ||
- /etc/docker/registry/config.yml | ||
securityContext: | ||
runAsUser: 65534 | ||
runAsGroup: 65534 | ||
fsGroup: 65534 | ||
volumeMounts: | ||
- name: config | ||
mountPath: {{ .Values.registry.configPath }} | ||
subPath: config.yaml | ||
restartPolicy: OnFailure | ||
{{- with .Values.registry.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.registry.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.registry.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: {{ template "core.registry" . }} | ||
{{- end }} |
Oops, something went wrong.