Skip to content

Commit

Permalink
Add kustomization manifest files (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-persson authored Oct 4, 2023
1 parent 8311903 commit 35101c8
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 0 deletions.
34 changes: 34 additions & 0 deletions manifests/base/api/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: etos-environment-provider
labels:
app.kubernetes.io/name: etos-environment-provider
app.kubernetes.io/part-of: etos
app.kubernetes.io/component: environment-provider-api
spec:
selector:
matchLabels:
app.kubernetes.io/name: etos-environment-provider
template:
metadata:
labels:
app.kubernetes.io/name: etos-environment-provider
spec:
serviceAccountName: etos-environment-provider
containers:
- name: etos-environment-provider
image: "registry.nordix.org/eiffel/etos-environment-provider:2.2.1"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /?id=healthcheck
port: http
readinessProbe:
httpGet:
path: /?id=healthcheck
port: http
8 changes: 8 additions & 0 deletions manifests/base/api/service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: etos-environment-provider
labels:
app.kubernetes.io/name: etos-environment-provider
app.kubernetes.io/part-of: etos
app.kubernetes.io/component: environment-provider-api
17 changes: 17 additions & 0 deletions manifests/base/api/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: etos-environment-provider
labels:
app.kubernetes.io/name: etos-environment-provider
app.kubernetes.io/part-of: etos
app.kubernetes.io/component: environment-provider-api
spec:
type: ClusterIP
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app.kubernetes.io/name: etos-environment-provider
19 changes: 19 additions & 0 deletions manifests/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- api/service-account.yaml
- api/deployment.yaml
- api/service.yaml
- worker/service-account.yaml
- worker/deployment.yaml


# By generating the configmap it will get a unique name on each apply
# this name is also set on the deployment. This means that the pods
# will restart with the new configmap when changes are made. Making
# it so we do not have to do rollout restart every time.
configMapGenerator:
- name: etos-environment-provider-worker
literals:
- ETR_VERSION="3.2.0"
- name: etos-environment-provider
28 changes: 28 additions & 0 deletions manifests/base/worker/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: etos-environment-provider-worker
labels:
app.kubernetes.io/name: etos-environment-provider-worker
app.kubernetes.io/part-of: etos
app.kubernetes.io/component: environment-provider-worker
spec:
selector:
matchLabels:
app.kubernetes.io/name: etos-environment-provider-worker
template:
metadata:
labels:
app.kubernetes.io/name: etos-environment-provider-worker
spec:
serviceAccountName: etos-environment-provider-worker
containers:
- name: etos-environment-provider-worker
image: "registry.nordix.org/eiffel/etos-environment-provider-worker:2.2.1"
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: etos-environment-provider-worker
# This grace period ensures that the environment provider will wait
# for the environment checkouts to complete before shutting down.
terminationGracePeriodSeconds: 4250
8 changes: 8 additions & 0 deletions manifests/base/worker/service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: etos-environment-provider-worker
labels:
app.kubernetes.io/name: etos-environment-provider-worker
app.kubernetes.io/part-of: etos
app.kubernetes.io/component: environment-provider-worker

0 comments on commit 35101c8

Please sign in to comment.