mysql: First working kustomize

This commit is contained in:
Florian RICHER 2025-03-27 11:26:11 +01:00
parent fa945f2e5c
commit 244458738c
10 changed files with 125 additions and 2 deletions

View file

@ -0,0 +1,34 @@
resources:
- ../../base
- phpmyadmin_ingress.yaml
namespace: default
labels:
- includeSelectors: true
pairs:
app: mysql
commonAnnotations:
owner: florian
namePrefix: mysql-
images:
- name: mysql
newName: mysql
newTag: "9"
- name: phpmyadmin
newName: phpmyadmin
newTag: "5.2"
patches:
- path: replica.yaml
configMapGenerator:
- name: mysql-configmap
env: mysql-configmap.properties
secretGenerator:
- name: mysql-secret
env: mysql-secret.properties

View file

@ -0,0 +1 @@
mysql-server=mysql-db-service

View file

@ -0,0 +1,3 @@
# Encoded base64 string required by kubernetes
# echo -n '<wanted_value>' | base64
mysql-root-password="cm9vdA=="

View file

@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: phpmyadmin-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: phpmyadmin-service
port:
number: 80

View file

@ -0,0 +1,6 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: phpmyadmin-deployment
spec:
replicas: 2