Skip to content

Commit 86e7486

Browse files
author
Wulf Thimm
committed
# This is a combination of 8 commits.
# This is the 1st commit message: dev # This is the commit message #2: dev # This is the commit message #3: dev # This is the commit message #4: dev # This is the commit message #5: dev # This is the commit message #6: dev # This is the commit message #7: dev # This is the commit message #8: dev
1 parent d819a6b commit 86e7486

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2348
-198
lines changed

chart/Chart.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Copyright (c) 2020 Gitpod GmbH. All rights reserved.
22
# Licensed under the MIT License. See License-MIT.txt in the project root for license information.
3-
43
apiVersion: v1
5-
appVersion: "0.1.5"
64
description: The core chart for Gitpod
75
name: gitpod
8-
version: 0.4.0
6+
version: 0.6.0
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
appVersion: 2.7.1
3+
description: A Helm chart for Docker Registry
4+
home: https://hub.docker.com/_/registry/
5+
icon: https://hub.docker.com/public/images/logos/mini-logo.svg
6+
maintainers:
7+
8+
name: jpds
9+
10+
name: rendhalver
11+
name: docker-registry
12+
sources:
13+
- https://github.com/docker/distribution-library-image
14+
version: 1.8.3

chart/charts/docker-registry/OWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
approvers:
2+
- jpds
3+
- rendhalver
4+
reviewers:
5+
- jpds
6+
- rendhalver
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Docker Registry Helm Chart
2+
3+
This directory contains a Kubernetes chart to deploy a private Docker Registry.
4+
5+
## Prerequisites Details
6+
7+
* PV support on underlying infrastructure (if persistence is required)
8+
9+
## Chart Details
10+
11+
This chart will do the following:
12+
13+
* Implement a Docker registry deployment
14+
15+
## Installing the Chart
16+
17+
To install the chart, use the following:
18+
19+
```console
20+
$ helm install stable/docker-registry
21+
```
22+
23+
## Configuration
24+
25+
The following table lists the configurable parameters of the docker-registry chart and
26+
their default values.
27+
28+
| Parameter | Description | Default |
29+
|:----------------------------|:-------------------------------------------------------------------------------------------|:----------------|
30+
| `image.pullPolicy` | Container pull policy | `IfNotPresent` |
31+
| `image.repository` | Container image to use | `registry` |
32+
| `image.tag` | Container image tag to deploy | `2.7.1` |
33+
| `imagePullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) |
34+
| `persistence.accessMode` | Access mode to use for PVC | `ReadWriteOnce` |
35+
| `persistence.enabled` | Whether to use a PVC for the Docker storage | `false` |
36+
| `persistence.deleteEnabled` | Enable the deletion of image blobs and manifests by digest | `nil` |
37+
| `persistence.size` | Amount of space to claim for PVC | `10Gi` |
38+
| `persistence.storageClass` | Storage Class to use for PVC | `-` |
39+
| `persistence.existingClaim` | Name of an existing PVC to use for config | `nil` |
40+
| `service.port` | TCP port on which the service is exposed | `5000` |
41+
| `service.type` | service type | `ClusterIP` |
42+
| `service.clusterIP` | if `service.type` is `ClusterIP` and this is non-empty, sets the cluster IP of the service | `nil` |
43+
| `service.nodePort` | if `service.type` is `NodePort` and this is non-empty, sets the node port of the service | `nil` |
44+
| `replicaCount` | k8s replicas | `1` |
45+
| `updateStrategy` | update strategy for deployment | `{}` |
46+
| `podAnnotations` | Annotations for pod | `{}` |
47+
| `podLabels` | Labels for pod | `{}` |
48+
| `podDisruptionBudget` | Pod disruption budget | `{}` |
49+
| `resources.limits.cpu` | Container requested CPU | `nil` |
50+
| `resources.limits.memory` | Container requested memory | `nil` |
51+
| `priorityClassName ` | priorityClassName | `""` |
52+
| `storage` | Storage system to use | `filesystem` |
53+
| `tlsSecretName` | Name of secret for TLS certs | `nil` |
54+
| `secrets.htpasswd` | Htpasswd authentication | `nil` |
55+
| `secrets.s3.accessKey` | Access Key for S3 configuration | `nil` |
56+
| `secrets.s3.secretKey` | Secret Key for S3 configuration | `nil` |
57+
| `secrets.swift.username` | Username for Swift configuration | `nil` |
58+
| `secrets.swift.password` | Password for Swift configuration | `nil` |
59+
| `haSharedSecret` | Shared secret for Registry | `nil` |
60+
| `configData` | Configuration hash for docker | `nil` |
61+
| `s3.region` | S3 region | `nil` |
62+
| `s3.regionEndpoint` | S3 region endpoint | `nil` |
63+
| `s3.bucket` | S3 bucket name | `nil` |
64+
| `s3.encrypt` | Store images in encrypted format | `nil` |
65+
| `s3.secure` | Use HTTPS | `nil` |
66+
| `swift.authurl` | Swift authurl | `nil` |
67+
| `swift.container` | Swift container | `nil` |
68+
| `nodeSelector` | node labels for pod assignment | `{}` |
69+
| `tolerations` | pod tolerations | `[]` |
70+
| `ingress.enabled` | If true, Ingress will be created | `false` |
71+
| `ingress.annotations` | Ingress annotations | `{}` |
72+
| `ingress.labels` | Ingress labels | `{}` |
73+
| `ingress.path` | Ingress service path | `/` |
74+
| `ingress.hosts` | Ingress hostnames | `[]` |
75+
| `ingress.tls` | Ingress TLS configuration (YAML) | `[]` |
76+
77+
Specify each parameter using the `--set key=value[,key=value]` argument to
78+
`helm install`.
79+
80+
To generate htpasswd file, run this docker command:
81+
`docker run --entrypoint htpasswd registry:2 -Bbn user password > ./htpasswd`.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
1. Get the application URL by running these commands:
2+
{{- if .Values.ingress.enabled }}
3+
{{- range .Values.ingress.hosts }}
4+
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
5+
{{- end }}
6+
{{- else if contains "NodePort" .Values.service.type }}
7+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "docker-registry.fullname" . }})
8+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
9+
echo http://$NODE_IP:$NODE_PORT
10+
{{- else if contains "LoadBalancer" .Values.service.type }}
11+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
12+
You can watch the status of by running 'kubectl get svc -w {{ template "docker-registry.fullname" . }}'
13+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "docker-registry.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
14+
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
15+
{{- else if contains "ClusterIP" .Values.service.type }}
16+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "docker-registry.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
17+
echo "Visit http://127.0.0.1:8080 to use your application"
18+
kubectl -n {{ .Release.Namespace }} port-forward $POD_NAME 8080:5000
19+
{{- end }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "docker-registry.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7+
{{- end -}}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
*/}}
13+
{{- define "docker-registry.fullname" -}}
14+
{{- if .Values.fullnameOverride -}}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
16+
{{- else -}}
17+
{{- $name := default .Chart.Name .Values.nameOverride -}}
18+
{{- if contains $name .Release.Name -}}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
20+
{{- else -}}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
22+
{{- end -}}
23+
{{- end -}}
24+
{{- end -}}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ template "docker-registry.fullname" . }}-config
5+
labels:
6+
app: {{ template "docker-registry.name" . }}
7+
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8+
heritage: {{ .Release.Service }}
9+
release: {{ .Release.Name }}
10+
data:
11+
config.yml: |-
12+
{{ toYaml .Values.configData | indent 4 }}

0 commit comments

Comments
 (0)