feat(docker): adding first Dockerfile and kustomization

This commit is contained in:
2023-06-13 15:44:55 +02:00
parent d3d9061699
commit 1508d44120
46 changed files with 3237 additions and 0 deletions

View File

@ -0,0 +1,21 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: app-dev
resources:
- ../../base
- resources/namespace.yaml
- resources/ingress.yaml
patches:
- path: patches/update-replicas-for-app.yaml
- path: patches/add-registry-pull-secret.yaml
target:
kind: Deployment
version: v1
secretGenerator:
- files:
- secrets/dockerconfig/.dockerconfigjson
name: regcred-dev
type: kubernetes.io/dockerconfigjson

View File

@ -0,0 +1,4 @@
- op: add
path: "/spec/template/spec/imagePullSecrets"
value:
- name: regcred-dev

View File

@ -0,0 +1,8 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: app
name: app
spec:
replicas: 1

View File

@ -0,0 +1,21 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "138m"
nginx.ingress.kubernetes.io/enable-cors: "true" #cf 01
nginx.ingress.kubernetes.io/cors-allow-headers: "X-Forwarded-For" #cf 01
spec:
ingressClassName: nginx
rules:
- host: app.dev.local
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: app
port:
number: 8080

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: app-dev

View File

@ -0,0 +1,3 @@
*
!.gitignore
!.gitkeep