mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-19 03:29:37 +02:00
Kubernetes integration (#80)
* chore(): skaffold
* chore(): kubernetes integration
* chore(skaffold): refine shokohsc profile
* chore(): removed docker & kubernetes from database + stoppedApp pin option
* Revert "chore(): removed docker & kubernetes from database + stoppedApp pin option"
This reverts commit 5111c7ad79
.
This commit is contained in:
parent
c1b61f9cd9
commit
8681f75bab
24 changed files with 5567 additions and 89 deletions
28
k8s/base/deployment.yaml
Normal file
28
k8s/base/deployment.yaml
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: flame
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: flame
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: flame
|
||||
spec:
|
||||
serviceAccountName: flame
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
containers:
|
||||
- name: flame
|
||||
image: shokohsc/flame
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 5005
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
17
k8s/base/ingress.yaml
Normal file
17
k8s/base/ingress.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: flame
|
||||
spec:
|
||||
rules:
|
||||
- host: flame.cluster.local
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: flame
|
||||
port:
|
||||
number: 80
|
9
k8s/base/kustomization.yaml
Normal file
9
k8s/base/kustomization.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: flame
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
- rbac.yaml
|
8
k8s/base/namespace.yaml
Normal file
8
k8s/base/namespace.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: flame
|
||||
labels:
|
||||
namespace: flame
|
||||
goldilocks.fairwinds.com/enabled: "true"
|
26
k8s/base/rbac.yaml
Normal file
26
k8s/base/rbac.yaml
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: flame
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: flame
|
||||
rules:
|
||||
- apiGroups: ["networking.k8s.io"]
|
||||
resources: ["ingresses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: flame
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: flame
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: flame
|
16
k8s/base/service.yaml
Normal file
16
k8s/base/service.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: flame
|
||||
labels:
|
||||
app: flame
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: flame
|
36
k8s/overlays/shokohsc/deployment.yaml
Normal file
36
k8s/overlays/shokohsc/deployment.yaml
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: flame
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: flame
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: flame
|
||||
spec:
|
||||
serviceAccountName: flame-dev
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
containers:
|
||||
- name: flame
|
||||
image: shokohsc/flame
|
||||
command:
|
||||
- npm
|
||||
args:
|
||||
- run
|
||||
- skaffold
|
||||
env:
|
||||
- name: NODE_ENV
|
||||
value: development
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 5005
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
28
k8s/overlays/shokohsc/ingress.yaml
Normal file
28
k8s/overlays/shokohsc/ingress.yaml
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: flame
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
cert-manager.io/cluster-issuer: ca-cluster-issuer
|
||||
flame.pawelmalak/name: flame
|
||||
flame.pawelmalak/url: dev.flame.shokohsc.home
|
||||
flame.pawelmalak/type: app
|
||||
flame.pawelmalak/icon: fire
|
||||
spec:
|
||||
rules:
|
||||
- host: dev.flame.shokohsc.home
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: flame
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- hosts:
|
||||
- dev.flame.shokohsc.home
|
||||
secretName: flame-cert
|
9
k8s/overlays/shokohsc/kustomization.yaml
Normal file
9
k8s/overlays/shokohsc/kustomization.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: flame-dev
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
- rbac.yaml
|
8
k8s/overlays/shokohsc/namespace.yaml
Normal file
8
k8s/overlays/shokohsc/namespace.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: flame-dev
|
||||
labels:
|
||||
namespace: flame-dev
|
||||
goldilocks.fairwinds.com/enabled: "true"
|
26
k8s/overlays/shokohsc/rbac.yaml
Normal file
26
k8s/overlays/shokohsc/rbac.yaml
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: flame-dev
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: flame-dev
|
||||
rules:
|
||||
- apiGroups: ["networking.k8s.io"]
|
||||
resources: ["ingresses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: flame-dev
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: flame-dev
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: flame-dev
|
16
k8s/overlays/shokohsc/service.yaml
Normal file
16
k8s/overlays/shokohsc/service.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: flame
|
||||
labels:
|
||||
app: flame
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: flame
|
Loading…
Add table
Add a link
Reference in a new issue