6 Commits

Author SHA1 Message Date
Devin Canterberry
489a5a25d9 🏁 v2.0.1 Release 2022-01-30 19:14:41 -08:00
Devin Canterberry
2884368a08 Merge pull request #51 from jsievenpiper/metrics
🌐 make protocol selection work with istio
2022-01-30 19:10:37 -08:00
Justin Sievenpiper
5d738bd9e7 🌐 make protocol selection work with istio 2022-01-27 15:20:49 -08:00
Devin Canterberry
2703d08224 🏁 v2.0.0 Release 2022-01-03 19:31:44 -08:00
Devin Canterberry
62c5b344a9 Merge pull request #48 from retupmoca/main
Fix #19 (new kubernetes API version)
2022-01-03 09:06:29 -08:00
Travis Loyd
266b0ea8d8 Fix #19 (new kubernetes API version)
This is a signed squash of unsigned commits made by both
Andrew <andrew@egeler.us> and Travis Loyd <fun.tloyd@gmail.com>. It is a
slight cleanup of Travis Loyd's PR #27

Travis Loyd <fun.tloyd@gmail.com>:
* Fix for issue number 19, current api version and previous api version need to be updated
* Added helm if statement to handle previous ingress 'http paths' style and current 'http paths' style
* adjusted helm if statement to accomidate scoping by setting as a variable up top
* moved new apiVersion variable to the top just under check for ingress enabled
* added ingressClassName and set a default value of 'nginx' in the values file

Andrew <andrew@egeler.us>:
* PR Change Cleanup
  * rename $apiVersion to $apiVersions
  * rename ingress.ingressClassName to ingress.className
  * add documentation entry for ingress.className
* fix README default value
2022-01-02 14:57:12 -05:00
7 changed files with 20 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart for Docker Registry
name: docker-registry
version: 1.16.0
version: 2.0.1
appVersion: 2.7.1
home: https://hub.docker.com/_/registry/
icon: https://helm.twun.io/docker-registry.png

View File

@@ -95,6 +95,7 @@ their default values.
| `ingress.path` | Ingress service path | `/` |
| `ingress.hosts` | Ingress hostnames | `[]` |
| `ingress.tls` | Ingress TLS configuration (YAML) | `[]` |
| `ingress.className` | Ingress controller class name | `nginx` |
| `metrics.enabled` | Enable metrics on Service | `false` |
| `metrics.port` | TCP port on which the service metrics is exposed | `5001` |
| `metrics.serviceMonitor.annotations` | Prometheus Operator ServiceMonitor annotations | `{}` |

View File

@@ -60,7 +60,7 @@ spec:
- containerPort: 5000
{{- if .Values.metrics.enabled }}
- containerPort: {{ (split ":" .Values.configData.http.debug.addr)._1 }}
name: metrics
name: http-metrics
protocol: TCP
{{- end }}
livenessProbe:

View File

@@ -1,8 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $apiVersions := .Capabilities.APIVersions -}}
{{- $serviceName := include "docker-registry.fullname" . -}}
{{- $servicePort := .Values.service.port -}}
{{- $path := .Values.ingress.path -}}
apiVersion: {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} networking.k8s.io/v1beta1 {{- else }} extensions/v1beta1 {{- end }}
apiVersion: {{- if $apiVersions.Has "networking.k8s.io/v1" }} networking.k8s.io/v1 {{- else }} networking.k8s.io/v1beta1 {{- end }}
kind: Ingress
metadata:
name: {{ template "docker-registry.fullname" . }}
@@ -20,15 +21,27 @@ metadata:
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
{{- if $apiVersions.Has "networking.k8s.io/v1" }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
rules:
{{- range $host := .Values.ingress.hosts }}
- host: {{ $host }}
http:
paths:
- path: {{ $path }}
{{- if $apiVersions.Has "networking.k8s.io/v1" }}
pathType: Prefix
backend:
service:
name: {{ $serviceName }}
port:
number: {{ $servicePort }}
{{- else }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end }}
{{- end -}}
{{- if .Values.ingress.tls }}
tls:

View File

@@ -41,7 +41,7 @@ spec:
{{- if .Values.metrics.enabled }}
- port: {{ .Values.metrics.port }}
protocol: TCP
name: metrics
name: http-metrics
targetPort: {{ (split ":" .Values.configData.http.debug.addr)._1 }}
{{- end }}
selector:

View File

@@ -16,6 +16,6 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
endpoints:
- port: metrics
- port: http-metrics
interval: 15s
{{- end }}

View File

@@ -37,6 +37,7 @@ service:
# foo.io/bar: "true"
ingress:
enabled: false
className: nginx
path: /
# Used to create an Ingress record.
hosts: