add app 2

This commit is contained in:
marcel-dempers 2023-03-11 20:57:15 +11:00
parent 8cf5032967
commit 91d3db711b
8 changed files with 127 additions and 0 deletions

View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: example-app-2
namespace: default
data:
config.json: |
{
"environment" : "dev"
}

View File

@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-app-2
labels:
app: example-app-2
namespace: default
spec:
selector:
matchLabels:
app: example-app-2
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: example-app-2
spec:
containers:
- name: example-app-2
image: example-app-2:0.0.1
ports:
- containerPort: 5000
volumeMounts:
- name: config-volume
mountPath: /configs/
volumes:
- name: config-volume
configMap:
name: example-app-2

View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
namespace: default
name: example-app-2
labels:
app: example-app-2
spec:
type: ClusterIP
selector:
app: example-app-2
ports:
- protocol: TCP
name: http
port: 80
targetPort: 5000

View File

@ -0,0 +1,10 @@
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
metadata:
name: example-app-2
namespace: default
spec:
interval: 1m0s
ref:
branch: fluxcd-2022
url: https://github.com/marcel-dempers/docker-development-youtube-series

View File

@ -0,0 +1,11 @@
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
metadata:
name: example-app-2
namespace: default
spec:
imageRepositoryRef:
name: example-app-2
policy:
semver:
range: 0.0.x

View File

@ -0,0 +1,10 @@
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageRepository
metadata:
name: example-app-2
namespace: default
spec:
image: docker.io/aimvector/example-app-2
interval: 1m0s
secretRef:
name: dockerhub-credential

View File

@ -0,0 +1,24 @@
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageUpdateAutomation
metadata:
name: example-app-1
namespace: default
spec:
interval: 1m0s
sourceRef:
kind: GitRepository
name: example-app-1
git:
checkout:
ref:
branch: fluxcd-2022
commit:
author:
email: fluxcdbot@users.noreply.github.com
name: fluxcdbot
messageTemplate: '{{range .Updated.Images}}{{println .}}{{end}}'
push:
branch: fluxcd-2022
update:
path: ./kubernetes/fluxcd/repositories/config/apps/example-app-2/deploy/deployment.yaml
strategy: Setters

View File

@ -0,0 +1,12 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: example-app-2
namespace: default
spec:
interval: 15m
path: "./kubernetes/fluxcd/repositories/config/apps/example-app-2/deploy"
prune: true
sourceRef:
kind: GitRepository
name: example-app-2