clean(structure): using MYAPPLICATION instead of app
This commit is contained in:
parent
1508d44120
commit
bcfe70200c
1
main.mk
1
main.mk
|
@ -36,7 +36,6 @@ define release_image
|
||||||
docker push $(IMAGE_REPO)/$1:$(IMAGE_VERSION)-$(DAY_SUFFIX_TAG)
|
docker push $(IMAGE_REPO)/$1:$(IMAGE_VERSION)-$(DAY_SUFFIX_TAG)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
#list:
|
#list:
|
||||||
build: ${IMAGES_DIR}/*
|
build: ${IMAGES_DIR}/*
|
||||||
@for name in $(basename $(notdir $^)); do \
|
@for name in $(basename $(notdir $^)); do \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
kind: Cluster
|
kind: Cluster
|
||||||
apiVersion: kind.x-k8s.io/v1alpha4
|
apiVersion: kind.x-k8s.io/v1alpha4
|
||||||
name: mse-dev
|
name: dev-cluster
|
||||||
networking:
|
networking:
|
||||||
podSubnet: "10.110.0.0/16"
|
podSubnet: "10.110.0.0/16"
|
||||||
serviceSubnet: "10.115.0.0/16"
|
serviceSubnet: "10.115.0.0/16"
|
||||||
|
|
|
@ -8,24 +8,24 @@ configurations:
|
||||||
- ./configurations/cnpg-cluster.yaml
|
- ./configurations/cnpg-cluster.yaml
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- ./resources/app-cnpg-cluster.yaml
|
- ./resources/MYAPPLICATION-cnpg-cluster.yaml
|
||||||
|
|
||||||
secretgenerator:
|
secretgenerator:
|
||||||
- name: app-postgres-admin
|
- name: MYAPPLICATION-postgres-admin
|
||||||
type: secret
|
type: secret
|
||||||
literals:
|
literals:
|
||||||
- username=postgres
|
- username=postgres
|
||||||
- password=notsosecret
|
- password=notsosecret
|
||||||
- name: app-postgres-user
|
- name: MYAPPLICATION-postgres-user
|
||||||
type: Secret
|
type: Secret
|
||||||
literals:
|
literals:
|
||||||
- username=app
|
- username=MYAPPLICATION
|
||||||
- password=NotSoSecretButThisIsBad
|
- password=NotSoSecretButThisIsBad
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
- name: APP_DATABASE_SERVICE_NAME
|
- name: MYAPPLICATION_DATABASE_SERVICE_NAME
|
||||||
objref:
|
objref:
|
||||||
name: app-postgres
|
name: MYAPPLICATION-postgres
|
||||||
kind: Cluster
|
kind: Cluster
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
fieldref:
|
fieldref:
|
|
@ -1,17 +1,17 @@
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
kind: Cluster
|
kind: Cluster
|
||||||
metadata:
|
metadata:
|
||||||
name: app-postgres
|
name: MYAPPLICATION-postgres
|
||||||
spec:
|
spec:
|
||||||
instances: 3
|
instances: 3
|
||||||
primaryUpdateStrategy: unsupervised
|
primaryUpdateStrategy: unsupervised
|
||||||
superuserSecret:
|
superuserSecret:
|
||||||
name: app-postgres-admin
|
name: MYAPPLICATION-postgres-admin
|
||||||
bootstrap:
|
bootstrap:
|
||||||
initdb:
|
initdb:
|
||||||
database: app
|
database: MYAPPLICATION
|
||||||
owner: app
|
owner: MYAPPLICATION
|
||||||
secret:
|
secret:
|
||||||
name: app-postgres-user
|
name: MYAPPLICATION-postgres-user
|
||||||
storage:
|
storage:
|
||||||
size: 20Gi
|
size: 20Gi
|
|
@ -1,10 +1,10 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
|
|
||||||
namePrefix: app-
|
namePrefix: MYAPPLICATION-
|
||||||
|
|
||||||
components:
|
components:
|
||||||
- components/app-cnpg
|
- components/MYAPPLICATION-cnpg
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- resources/app-kube
|
- resources/MYAPPLICATION-kube
|
||||||
|
|
|
@ -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
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
io.kompose.service: app
|
io.kompose.service: MYAPPLICATION
|
||||||
name: app
|
name: MYAPPLICATION
|
||||||
spec:
|
spec:
|
||||||
replicas: 3
|
replicas: 3
|
||||||
|
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
io.kompose.service: app
|
io.kompose.service: MYAPPLICATION
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
io.kompose.service: app
|
io.kompose.service: MYAPPLICATION
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
containers:
|
containers:
|
||||||
- image: reg.cadoles.com/cadoles/app-kube
|
- image: reg.cadoles.com/cadoles/MYAPPLICATION-kube
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
name: app-php-fpm
|
name: MYAPPLICATION-php-fpm
|
||||||
args: ["/usr/sbin/php-fpm81", "-F", "-e"]
|
args: ["/usr/sbin/php-fpm81", "-F", "-e"]
|
||||||
resources: {}
|
resources: {}
|
||||||
env:
|
env:
|
||||||
|
@ -33,22 +33,22 @@ spec:
|
||||||
value: 128m
|
value: 128m
|
||||||
- name: PHP_FPM_LOG_LEVEL
|
- name: PHP_FPM_LOG_LEVEL
|
||||||
value: warning
|
value: warning
|
||||||
- name: APP_DATABASE_SERVICE_NAME
|
- name: MYAPPLICATION_DATABASE_SERVICE_NAME
|
||||||
value: $(APP_DATABASE_SERVICE_NAME)-rw
|
value: $(MYAPPLICATION_DATABASE_SERVICE_NAME)-rw
|
||||||
- image: reg.cadoles.com/cadoles/app-kube
|
- image: reg.cadoles.com/cadoles/MYAPPLICATION-kube
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
name: app-nginx
|
name: MYAPPLICATION-nginx
|
||||||
args: ["/usr/sbin/nginx"]
|
args: ["/usr/sbin/nginx"]
|
||||||
env:
|
env:
|
||||||
- name: NGINX_APP_UPSTREAM_BACKEND_SERVER
|
- name: NGINX_MYAPPLICATION_UPSTREAM_BACKEND_SERVER
|
||||||
value: 127.0.0.1:9000
|
value: 127.0.0.1:9000
|
||||||
- name: NGINX_APP_ROOT
|
- name: NGINX_MYAPPLICATION_ROOT
|
||||||
value: "/public"
|
value: "/public"
|
||||||
- name: NGINX_APP_PHP_INDEX
|
- name: NGINX_MYAPPLICATION_PHP_INDEX
|
||||||
value: "/index.php"
|
value: "/index.php"
|
||||||
- name: NGINX_ERROR_LOG_LEVEL
|
- name: NGINX_ERROR_LOG_LEVEL
|
||||||
value: "warn"
|
value: "warn"
|
||||||
- name: NGINX_APP_PHP_NON_FILE_PATTERN
|
- name: NGINX_MYAPPLICATION_PHP_NON_FILE_PATTERN
|
||||||
value: "^/index\\.php(/|$)"
|
value: "^/index\\.php(/|$)"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
|
@ -2,13 +2,13 @@ apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
io.kompose.service: app
|
io.kompose.service: MYAPPLICATION
|
||||||
name: app
|
name: MYAPPLICATION
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
- name: app-http
|
- name: MYAPPLICATION-http
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: 8080
|
targetPort: 8080
|
||||||
selector:
|
selector:
|
||||||
io.kompose.service: app
|
io.kompose.service: MYAPPLICATION
|
|
@ -1,6 +0,0 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
|
|
||||||
resources:
|
|
||||||
- ./resources/app-service.yaml
|
|
||||||
- ./resources/app-deployment.yaml
|
|
|
@ -1,6 +1,6 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: app-dev
|
namespace: MYAPPLICATION-dev
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- ../../base
|
- ../../base
|
||||||
|
@ -8,7 +8,7 @@ resources:
|
||||||
- resources/ingress.yaml
|
- resources/ingress.yaml
|
||||||
|
|
||||||
patches:
|
patches:
|
||||||
- path: patches/update-replicas-for-app.yaml
|
- path: patches/update-replicas-for-MYAPPLICATION.yaml
|
||||||
- path: patches/add-registry-pull-secret.yaml
|
- path: patches/add-registry-pull-secret.yaml
|
||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|
|
@ -2,7 +2,7 @@ apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
io.kompose.service: app
|
io.kompose.service: MYAPPLICATION
|
||||||
name: app
|
name: MYAPPLICATION
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
|
@ -1,7 +1,7 @@
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: app
|
name: MYAPPLICATION
|
||||||
annotations:
|
annotations:
|
||||||
nginx.ingress.kubernetes.io/proxy-body-size: "138m"
|
nginx.ingress.kubernetes.io/proxy-body-size: "138m"
|
||||||
nginx.ingress.kubernetes.io/enable-cors: "true" #cf 01
|
nginx.ingress.kubernetes.io/enable-cors: "true" #cf 01
|
||||||
|
@ -9,13 +9,13 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
rules:
|
rules:
|
||||||
- host: app.dev.local
|
- host: MYAPPLICATION.dev.local
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: app
|
name: MYAPPLICATION
|
||||||
port:
|
port:
|
||||||
number: 8080
|
number: 8080
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: app-dev
|
name: MYAPPLICATION-dev
|
||||||
|
|
Loading…
Reference in New Issue