Skip to content

Commit

Permalink
test secure storage
Browse files Browse the repository at this point in the history
  • Loading branch information
oksana-grishchenko committed Nov 20, 2024
1 parent 3a21548 commit 2f4d3fa
Show file tree
Hide file tree
Showing 2 changed files with 285 additions and 219 deletions.
59 changes: 59 additions & 0 deletions .github/secure-registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: registry
spec:
replicas: 1
selector:
matchLabels:
app: registry
template:
metadata:
labels:
app: registry
spec:
containers:
- name: registry
image: registry:2
ports:
- containerPort: 5000
volumeMounts:
- name: registry-certs
mountPath: /certs
volumes:
- name: registry-certs
emptyDir: {}
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: selfsigned-issuer
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt-staging
spec:
acme:
server: https://acme-staging-v02.api.letsencrypt.org/directory
email: [email protected]
privateKeySecretRef:
name: letsencrypt-staging-private-key
solvers:
- http01:
ingress:
class: nginx # or your ingress controller's class
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: registry-cert
spec:
dnsNames:
- localhost # Or a different DNS name if you're using an Ingress
issuerRef:
name: selfsigned-issuer # Or letsencrypt-staging
kind: Issuer
secretName: registry-certs #Must match the volumeMount name in the deployment
Loading

0 comments on commit 2f4d3fa

Please sign in to comment.