mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 10:04:30 +00:00
- Add ssl_hosts group and prole_ssl role to deploy registry cert/key to /etc/ssl/certs/prole - Configure k8s registry deployment to serve HTTPS using mounted host certs - Switch k3s/containerd registry mirror config to https:// and prefer HTTPS checks with HTTP fallback Co-authored-by: Junie <junie@jetbrains.com>
61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: registry
|
|
labels:
|
|
app: registry
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: registry
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: registry
|
|
spec:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: myrddin.prole.org
|
|
containers:
|
|
- name: registry
|
|
image: registry:2
|
|
ports:
|
|
- containerPort: 5000
|
|
hostPort: 5000
|
|
name: https
|
|
env:
|
|
- name: REGISTRY_HTTP_ADDR
|
|
value: "0.0.0.0:5000"
|
|
- name: REGISTRY_HTTP_TLS_CERTIFICATE
|
|
value: "/etc/ssl/certs/prole/myrddin-registry.crt"
|
|
- name: REGISTRY_HTTP_TLS_KEY
|
|
value: "/etc/ssl/certs/prole/myrddin-registry.key"
|
|
volumeMounts:
|
|
- name: registry-data
|
|
mountPath: /var/lib/registry
|
|
- name: registry-certs
|
|
mountPath: /etc/ssl/certs/prole
|
|
readOnly: true
|
|
volumes:
|
|
- name: registry-data
|
|
emptyDir: {}
|
|
- name: registry-certs
|
|
hostPath:
|
|
path: /etc/ssl/certs/prole
|
|
type: Directory
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: registry
|
|
labels:
|
|
app: registry
|
|
spec:
|
|
selector:
|
|
app: registry
|
|
ports:
|
|
- name: https
|
|
port: 5000
|
|
targetPort: https
|
|
type: ClusterIP
|