fup
This commit is contained in:
@ -8,24 +8,24 @@ configurations:
|
||||
- ./configurations/cnpg-cluster.yaml
|
||||
|
||||
resources:
|
||||
- ./resources/MYAPPLICATION-cnpg-cluster.yaml
|
||||
- ./resources/myapplication-cnpg-cluster.yaml
|
||||
|
||||
secretgenerator:
|
||||
- name: MYAPPLICATION-postgres-admin
|
||||
- name: myapplication-postgres-admin
|
||||
type: secret
|
||||
literals:
|
||||
- username=postgres
|
||||
- password=notsosecret
|
||||
- name: MYAPPLICATION-postgres-user
|
||||
- name: myapplication-postgres-user
|
||||
type: Secret
|
||||
literals:
|
||||
- username=MYAPPLICATION
|
||||
- username=myapplication
|
||||
- password=NotSoSecretButThisIsBad
|
||||
|
||||
vars:
|
||||
- name: MYAPPLICATION_DATABASE_SERVICE_NAME
|
||||
- name: myapplication_DATABASE_SERVICE_NAME
|
||||
objref:
|
||||
name: MYAPPLICATION-postgres
|
||||
name: myapplication-postgres
|
||||
kind: Cluster
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
fieldref:
|
@ -1,17 +1,17 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: MYAPPLICATION-postgres
|
||||
name: myapplication-postgres
|
||||
spec:
|
||||
instances: 3
|
||||
primaryUpdateStrategy: unsupervised
|
||||
superuserSecret:
|
||||
name: MYAPPLICATION-postgres-admin
|
||||
name: myapplication-postgres-admin
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: MYAPPLICATION
|
||||
owner: MYAPPLICATION
|
||||
database: myapplication
|
||||
owner: myapplication
|
||||
secret:
|
||||
name: MYAPPLICATION-postgres-user
|
||||
name: myapplication-postgres-user
|
||||
storage:
|
||||
size: 20Gi
|
@ -1,10 +1,10 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namePrefix: MYAPPLICATION-
|
||||
namePrefix: myapplication-
|
||||
|
||||
components:
|
||||
- components/MYAPPLICATION-cnpg
|
||||
- components/myapplication-cnpg
|
||||
|
||||
resources:
|
||||
- resources/MYAPPLICATION-kube
|
||||
- resources/myapplication-kube
|
||||
|
@ -1,6 +0,0 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ./resources/MYAPPLICATION-service.yaml
|
||||
- ./resources/MYAPPLICATION-deployment.yaml
|
@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ./resources/myapplication-service.yaml
|
||||
- ./resources/myapplication-deployment.yaml
|
@ -2,26 +2,26 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
io.kompose.service: MYAPPLICATION
|
||||
name: MYAPPLICATION
|
||||
io.kompose.service: myapplication
|
||||
name: myapplication
|
||||
spec:
|
||||
replicas: 3
|
||||
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: MYAPPLICATION
|
||||
io.kompose.service: myapplication
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
io.kompose.service: MYAPPLICATION
|
||||
io.kompose.service: myapplication
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
containers:
|
||||
- image: reg.cadoles.com/cadoles/MYAPPLICATION-kube
|
||||
- image: reg.cadoles.com/cadoles/myapplication-kube
|
||||
imagePullPolicy: Always
|
||||
name: MYAPPLICATION-php-fpm
|
||||
name: myapplication-php-fpm
|
||||
args: ["/usr/sbin/php-fpm81", "-F", "-e"]
|
||||
resources: {}
|
||||
env:
|
||||
@ -33,22 +33,22 @@ spec:
|
||||
value: 128m
|
||||
- name: PHP_FPM_LOG_LEVEL
|
||||
value: warning
|
||||
- name: MYAPPLICATION_DATABASE_SERVICE_NAME
|
||||
value: $(MYAPPLICATION_DATABASE_SERVICE_NAME)-rw
|
||||
- image: reg.cadoles.com/cadoles/MYAPPLICATION-kube
|
||||
- name: myapplication_DATABASE_SERVICE_NAME
|
||||
value: $(myapplication_DATABASE_SERVICE_NAME)-rw
|
||||
- image: reg.cadoles.com/cadoles/myapplication-kube
|
||||
imagePullPolicy: Always
|
||||
name: MYAPPLICATION-nginx
|
||||
name: myapplication-nginx
|
||||
args: ["/usr/sbin/nginx"]
|
||||
env:
|
||||
- name: NGINX_MYAPPLICATION_UPSTREAM_BACKEND_SERVER
|
||||
- name: NGINX_myapplication_UPSTREAM_BACKEND_SERVER
|
||||
value: 127.0.0.1:9000
|
||||
- name: NGINX_MYAPPLICATION_ROOT
|
||||
- name: NGINX_myapplication_ROOT
|
||||
value: "/public"
|
||||
- name: NGINX_MYAPPLICATION_PHP_INDEX
|
||||
- name: NGINX_myapplication_PHP_INDEX
|
||||
value: "/index.php"
|
||||
- name: NGINX_ERROR_LOG_LEVEL
|
||||
value: "warn"
|
||||
- name: NGINX_MYAPPLICATION_PHP_NON_FILE_PATTERN
|
||||
- name: NGINX_myapplication_PHP_NON_FILE_PATTERN
|
||||
value: "^/index\\.php(/|$)"
|
||||
ports:
|
||||
- containerPort: 8080
|
@ -2,13 +2,13 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
io.kompose.service: MYAPPLICATION
|
||||
name: MYAPPLICATION
|
||||
io.kompose.service: myapplication
|
||||
name: myapplication
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: MYAPPLICATION-http
|
||||
- name: myapplication-http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
selector:
|
||||
io.kompose.service: MYAPPLICATION
|
||||
io.kompose.service: myapplication
|
Reference in New Issue
Block a user