mirror of
https://codeberg.org/27/inception-of-things.git
synced 2025-12-31 21:56:41 +01:00
add: argo installer and base app
This commit is contained in:
18
p3/confs/app.yml
Normal file
18
p3/confs/app.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: app-deployment
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: app
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: app
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: app
|
||||||
|
image: wil42/playground:v2
|
||||||
|
ports:
|
||||||
|
- containerPort: 8888
|
||||||
@ -1,24 +1,16 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: argocd-ingress
|
name: app-ingress
|
||||||
namespace: argocd
|
|
||||||
annotations:
|
|
||||||
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
|
|
||||||
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
|
|
||||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
|
||||||
nginx.ingress.kubernetes.io/ssl-verify: "off"
|
|
||||||
nginx.ingress.kubernetes.io/ssl-verify-depth: "1"
|
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
|
||||||
rules:
|
rules:
|
||||||
- host: argocd.localhost
|
- host: localhost
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: argocd-server
|
name: app-service
|
||||||
port:
|
port:
|
||||||
name: https
|
number: 80
|
||||||
11
p3/confs/service.yml
Normal file
11
p3/confs/service.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: app-service
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: app
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8888
|
||||||
@ -9,6 +9,17 @@ kubectl wait --namespace argocd \
|
|||||||
--selector=app.kubernetes.io/name=argocd-server \
|
--selector=app.kubernetes.io/name=argocd-server \
|
||||||
--timeout=300s \
|
--timeout=300s \
|
||||||
1>/dev/null 2>/dev/null
|
1>/dev/null 2>/dev/null
|
||||||
kubectl port-forward svc/argocd-server -n argocd 8080:443 1>/dev/null &
|
kubectl port-forward svc/argocd-server -n argocd 8080:443 1>/dev/null 2>/dev/null &
|
||||||
echo 'ArgoCD is running (http://127.0.0.1:8080)'
|
echo 'ArgoCD is running (http://127.0.0.1:8080)'
|
||||||
echo login=admin password=\'$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)\'
|
echo login=admin password=\'$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)\'
|
||||||
|
kubectl create namespace dev
|
||||||
|
kubectl apply -n dev -f ../confs/app.yml
|
||||||
|
echo 'App is starting...'
|
||||||
|
kubectl wait --namespace argocd \
|
||||||
|
--for=condition=ready pod \
|
||||||
|
--selector=app.kubernetes.io/name=argocd-server \
|
||||||
|
--timeout=300s \
|
||||||
|
1>/dev/null 2>/dev/null
|
||||||
|
kubectl apply -n dev -f ../confs/service.yml
|
||||||
|
kubectl apply -n dev -f ../confs/ingress.yml
|
||||||
|
echo 'App is running (http://127.0.0.1:80)'
|
||||||
@ -1,3 +1,7 @@
|
|||||||
kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
||||||
|
kubectl delete -n dev -f ../confs/ingress.yml
|
||||||
|
kubectl delete -n dev -f ../confs/service.yml
|
||||||
|
kubectl delete -n dev -f ../confs/app.yml
|
||||||
kubectl delete namespace argocd
|
kubectl delete namespace argocd
|
||||||
|
kubectl delete namespace dev
|
||||||
k3d cluster delete inception-of-things
|
k3d cluster delete inception-of-things
|
||||||
Reference in New Issue
Block a user