riju/k8s/01-secrets/01-docker-registry.in.yaml

77 lines
1.5 KiB
YAML

---
kind: Secret
apiVersion: v1
metadata:
namespace: docker-registry
name: docker-registry-s3-auth
stringData:
access-key: "{{ .registry.s3.accessKey }}"
secret-key: "{{ .registry.s3.secretKey }}"
---
kind: ConfigMap
apiVersion: v1
metadata:
namespace: docker-registry
name: docker-registry-s3-config
data:
bucket: "{{ .registry.s3.bucket }}"
region: "{{ .registry.s3.region }}"
endpoint: "{{ .registry.s3.endpoint }}"
---
kind: Secret
apiVersion: v1
metadata:
namespace: docker-registry
name: docker-registry-http-secret
stringData:
http-secret: "{{ .registry.httpSecret }}"
---
kind: Secret
apiVersion: v1
metadata:
namespace: docker-registry
name: docker-registry-htpasswd
data:
htpasswd: "{{ .registry.htpasswd | println | b64enc }}"
---
kind: Secret
apiVersion: v1
metadata:
namespace: riju-server
name: docker-registry-auth
type: kubernetes.io/dockerconfigjson
stringData:
.dockerconfigjson: |
{
"auths": {
"localhost:30999": {
"username": "admin",
"password": "{{ .registry.password }}",
"auth": "{{ .registry.password | printf "admin:%s" | b64enc }}"
}
}
}
---
kind: Secret
apiVersion: v1
metadata:
namespace: user
name: docker-registry-auth
type: kubernetes.io/dockerconfigjson
stringData:
.dockerconfigjson: |
{
"auths": {
"localhost:30999": {
"username": "admin",
"password": "{{ .registry.password }}",
"auth": "{{ .registry.password | printf "admin:%s" | b64enc }}"
}
}
}