add initial config for mediawiki and teastore
All checks were successful
Mirror to GitHub / mirror (push) Successful in 8s
All checks were successful
Mirror to GitHub / mirror (push) Successful in 8s
This commit is contained in:
23
mediawiki/application.yaml
Normal file
23
mediawiki/application.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: mediawiki
|
||||||
|
namespace: ptp-chat
|
||||||
|
spec:
|
||||||
|
project: ptp-chat
|
||||||
|
source:
|
||||||
|
repoURL: https://gitea.controller.bittehackmichnicht.de/argocd/kubernetes-config.git
|
||||||
|
targetRevision: main
|
||||||
|
path: mediawiki
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: ptp-chat
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
enabled: true
|
||||||
|
ignoreDifferences:
|
||||||
|
- kind: Secret
|
||||||
|
jsonPointers:
|
||||||
|
- /data
|
||||||
70
mediawiki/db.yaml
Normal file
70
mediawiki/db.yaml
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
# Source: portainer/templates/pvc.yaml
|
||||||
|
kind: "PersistentVolumeClaim"
|
||||||
|
apiVersion: "v1"
|
||||||
|
metadata:
|
||||||
|
name: mediawiki-pvc
|
||||||
|
namespace: ptp-chat
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 3Gi
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mediawiki-db
|
||||||
|
namespace: ptp-chat
|
||||||
|
labels:
|
||||||
|
app: mediawiki-db
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mediawiki-db
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mediawiki-db
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mediawiki-db
|
||||||
|
image: mariadb:latest
|
||||||
|
env:
|
||||||
|
- name: MARIADB_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: ptp-chat-secret
|
||||||
|
key: SPRING_DATASOURCE_USERNAME
|
||||||
|
- name: MARIADB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: ptp-chat-secret
|
||||||
|
key: SPRING_DATASOURCE_PASSWORD
|
||||||
|
- name: MARIADB_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: ptp-chat-secret
|
||||||
|
key: SPRING_DATASOURCE_PASSWORD
|
||||||
|
- name: MARIADB_DATABASE
|
||||||
|
value: mediawiki
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 3306
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 0.1Gi
|
||||||
|
cpu: 0.01
|
||||||
|
limits:
|
||||||
|
memory: 0.4Gi
|
||||||
|
cpu: 0.05
|
||||||
|
volumeMounts:
|
||||||
|
- name: mediawiki-pvc
|
||||||
|
mountPath: /var/lib/mysql
|
||||||
|
readOnly: false
|
||||||
|
volumes:
|
||||||
|
- name: mediawiki-pvc
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: mediawiki-pvc
|
||||||
71
mediawiki/istio.yaml
Normal file
71
mediawiki/istio.yaml
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mediawiki-app
|
||||||
|
namespace: ptp-chat
|
||||||
|
labels:
|
||||||
|
app: mediawiki-app
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
|
selector:
|
||||||
|
app: mediawiki-app
|
||||||
|
type: NodePort
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mediawiki-db
|
||||||
|
namespace: ptp-chat
|
||||||
|
labels:
|
||||||
|
app: mediawiki-db
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 3306
|
||||||
|
targetPort: 3306
|
||||||
|
selector:
|
||||||
|
app: mediawiki-db
|
||||||
|
type: NodePort
|
||||||
|
---
|
||||||
|
apiVersion: networking.istio.io/v1beta1
|
||||||
|
kind: Gateway
|
||||||
|
metadata:
|
||||||
|
name: mediawiki-gateway
|
||||||
|
namespace: ptp-chat
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
istio: ingressgateway # Holt sich das Standard-Ingress-Gateway
|
||||||
|
servers:
|
||||||
|
- port:
|
||||||
|
number: 443
|
||||||
|
name: https-ptpchat
|
||||||
|
protocol: HTTPS
|
||||||
|
hosts:
|
||||||
|
- mediawiki.k8s.bittehackmichnicht.de
|
||||||
|
tls:
|
||||||
|
mode: SIMPLE # TLS-Termination am Gateway, damit der VirtualService den Traffic aufteilen kann
|
||||||
|
credentialName: istio-cert # Name des TLS-Zertifikats in Kubernetes, das für die Verschlüsselung verwendet wird
|
||||||
|
---
|
||||||
|
apiVersion: networking.istio.io/v1beta1
|
||||||
|
kind: VirtualService
|
||||||
|
metadata:
|
||||||
|
name: mediawiki-vs
|
||||||
|
namespace: ptp-chat
|
||||||
|
spec:
|
||||||
|
hosts:
|
||||||
|
- mediawiki.k8s.bittehackmichnicht.de
|
||||||
|
gateways:
|
||||||
|
- mediawiki-gateway
|
||||||
|
http:
|
||||||
|
- match:
|
||||||
|
- uri:
|
||||||
|
prefix: /
|
||||||
|
route:
|
||||||
|
- destination:
|
||||||
|
host: mediawiki-app.ptp-chat.svc.cluster.local
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
9
mediawiki/kustomization.yaml
Normal file
9
mediawiki/kustomization.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: ptp-chat
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- istio.yaml
|
||||||
|
- db.yaml
|
||||||
|
- mediawiki.yaml
|
||||||
46
mediawiki/mediawiki.yaml
Normal file
46
mediawiki/mediawiki.yaml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mediawiki-app
|
||||||
|
namespace: ptp-chat
|
||||||
|
labels:
|
||||||
|
app: mediawiki-app
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mediawiki-app
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mediawiki-app
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mediawiki-app
|
||||||
|
image: mediawiki:1.45
|
||||||
|
env:
|
||||||
|
- name: MEDIAWIKI_DB_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: ptp-chat-secret
|
||||||
|
key: SPRING_DATASOURCE_USERNAME
|
||||||
|
- name: MEDIAWIKI_DB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: ptp-chat-secret
|
||||||
|
key: SPRING_DATASOURCE_PASSWORD
|
||||||
|
- name: MEDIAWIKI_DB_NAME
|
||||||
|
value: mediawiki
|
||||||
|
- name: MEDIAWIKI_DB_HOST
|
||||||
|
value: mediawiki-db.ptp-chat.svc.cluster.local
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 0.1Gi
|
||||||
|
cpu: 0.01
|
||||||
|
limits:
|
||||||
|
memory: 0.4Gi
|
||||||
|
cpu: 0.05
|
||||||
|
|
||||||
23
teastore/application.yaml
Normal file
23
teastore/application.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: teastore
|
||||||
|
namespace: ptp-chat
|
||||||
|
spec:
|
||||||
|
project: ptp-chat
|
||||||
|
source:
|
||||||
|
repoURL: https://gitea.controller.bittehackmichnicht.de/argocd/kubernetes-config.git
|
||||||
|
targetRevision: main
|
||||||
|
path: teastore
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: ptp-chat
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
enabled: true
|
||||||
|
ignoreDifferences:
|
||||||
|
- kind: Secret
|
||||||
|
jsonPointers:
|
||||||
|
- /data
|
||||||
39
teastore/istio.yaml
Normal file
39
teastore/istio.yaml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
apiVersion: networking.istio.io/v1beta1
|
||||||
|
kind: Gateway
|
||||||
|
metadata:
|
||||||
|
name: teastore-gateway
|
||||||
|
namespace: ptp-chat
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
istio: ingressgateway # Holt sich das Standard-Ingress-Gateway
|
||||||
|
servers:
|
||||||
|
- port:
|
||||||
|
number: 443
|
||||||
|
name: https-teastore
|
||||||
|
protocol: HTTPS
|
||||||
|
hosts:
|
||||||
|
- teastore.k8s.bittehackmichnicht.de
|
||||||
|
tls:
|
||||||
|
mode: SIMPLE # TLS-Termination am Gateway, damit der VirtualService den Traffic aufteilen kann
|
||||||
|
credentialName: istio-cert # Name des TLS-Zertifikats in Kubernetes, das für die Verschlüsselung verwendet wird
|
||||||
|
---
|
||||||
|
apiVersion: networking.istio.io/v1beta1
|
||||||
|
kind: VirtualService
|
||||||
|
metadata:
|
||||||
|
name: teastore-vs
|
||||||
|
namespace: ptp-chat
|
||||||
|
spec:
|
||||||
|
hosts:
|
||||||
|
- teastore.k8s.bittehackmichnicht.de
|
||||||
|
gateways:
|
||||||
|
- teastore-gateway
|
||||||
|
http:
|
||||||
|
- match:
|
||||||
|
- uri:
|
||||||
|
prefix: /
|
||||||
|
route:
|
||||||
|
- destination:
|
||||||
|
host: teastore-webui.ptp-chat.svc.cluster.local
|
||||||
|
port:
|
||||||
|
number: 8080
|
||||||
22
teastore/kustomization.yaml
Normal file
22
teastore/kustomization.yaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: ptp-chat
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- istio.yaml
|
||||||
|
- https://raw.githubusercontent.com/DescartesResearch/TeaStore/master/examples/kubernetes/teastore-clusterip.yaml
|
||||||
|
|
||||||
|
patches:
|
||||||
|
- target:
|
||||||
|
kind: Service
|
||||||
|
name: teastore-webui
|
||||||
|
patch: |-
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: teastore-webui
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
targetPort: 8080
|
||||||
Reference in New Issue
Block a user