Skip to content

Commit

Permalink
issue #1: Added vault to manage secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasCardin committed Jan 3, 2024
1 parent 6fc5018 commit 2c8d565
Show file tree
Hide file tree
Showing 20 changed files with 1,525 additions and 15 deletions.
26 changes: 22 additions & 4 deletions kubernetes/apps/demo/nginx-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:

---
apiVersion: v1
kind: Service
kind: Service
metadata:
name: nginx
namespace: nginx
Expand All @@ -48,15 +48,15 @@ metadata:
name: nginx-ingress
namespace: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
cert-manager.io/cluster-issuer: letsencrypt-http
ingress.kubernetes.io/force-ssl-redirect: "true"
kubernetes.io/tls-acme: "true"
spec:
ingressClassName: nginx
tls:
- hosts:
- nginx.ninebasetwo.xyz
secretName: nginx-tls
secretName: aciacfia-tls
rules:
- host: nginx.ninebasetwo.xyz
http:
Expand All @@ -67,4 +67,22 @@ spec:
service:
name: nginx
port:
number: 80
number: 80

# ---
# apiVersion: gateway.networking.k8s.io/v1beta1
# kind: HTTPRoute
# metadata:
# name: nginx-http-route
# namespace: nginx
# spec:
# parentRefs:
# - name: gateway-gke-l7-rilb
# rules:
# - matches:
# - path:
# type: PathPrefix
# value: "/"
# backendRefs:
# - name: nginx
# port: 80
70 changes: 70 additions & 0 deletions kubernetes/apps/nachet/nachet-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
apiVersion: v1
kind: Namespace
metadata:
name: nachet
labels:
name: nachet

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nachet-deployment
namespace: nachet
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80

---
apiVersion: v1
kind: Service
metadata:
name: nachet
namespace: nachet
spec:
clusterIP: None
selector:
app: nginx
ports:
- protocol: TCP
port: 80

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nachet-ingress
namespace: nachet
annotations:
cert-manager.io/cluster-issuer: letsencrypt-http
ingress.kubernetes.io/force-ssl-redirect: "true"
kubernetes.io/tls-acme: "true"
spec:
ingressClassName: nginx
tls:
- hosts:
- nachet.ninebasetwo.xyz
secretName: aciacfia-tls
rules:
- host: nachet.ninebasetwo.xyz
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx
port:
number: 80
4 changes: 2 additions & 2 deletions kubernetes/system/cert-manager/issuer.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
name: letsencrypt-http
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: [email protected]
email: [email protected]
privateKeySecretRef:
name: letsencrypt-private-key
solvers:
Expand Down
7 changes: 7 additions & 0 deletions kubernetes/system/vault/namespace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Namespace
metadata:
name: vault
labels:
name: vault

Loading

0 comments on commit 2c8d565

Please sign in to comment.