mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
example-app
This commit is contained in:
parent
cfb70bac24
commit
4d02dbe534
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,3 +11,4 @@ __pycache__/
|
|||||||
security/letsencrypt/introduction/certs/**
|
security/letsencrypt/introduction/certs/**
|
||||||
kubernetes/shipa/installs/shipa-helm-chart-1.1.1/
|
kubernetes/shipa/installs/shipa-helm-chart-1.1.1/
|
||||||
messaging/kafka/data/*
|
messaging/kafka/data/*
|
||||||
|
kubernetes/portainer/volume*
|
||||||
|
10
kubernetes/portainer/example-application/configmap.yaml
Normal file
10
kubernetes/portainer/example-application/configmap.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: example-config
|
||||||
|
data:
|
||||||
|
config.json: |
|
||||||
|
{
|
||||||
|
"environment" : "dev"
|
||||||
|
}
|
||||||
|
# kubectl create configmap example-config --from-file ./golang/configs/config.json
|
43
kubernetes/portainer/example-application/deployment.yaml
Normal file
43
kubernetes/portainer/example-application/deployment.yaml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: example-deploy
|
||||||
|
labels:
|
||||||
|
app: example-app
|
||||||
|
test: test
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: example-app
|
||||||
|
replicas: 2
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 1
|
||||||
|
maxUnavailable: 0
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: example-app
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: example-app
|
||||||
|
image: aimvector/python:1.0.3
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 5000
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: "50m"
|
||||||
|
limits:
|
||||||
|
memory: "256Mi"
|
||||||
|
cpu: "500m"
|
||||||
|
volumeMounts:
|
||||||
|
- name: config-volume
|
||||||
|
mountPath: /configs/
|
||||||
|
volumes:
|
||||||
|
- name: config-volume
|
||||||
|
configMap:
|
||||||
|
name: example-config
|
17
kubernetes/portainer/example-application/ingress.yaml
Normal file
17
kubernetes/portainer/example-application/ingress.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: example-ingress
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: marcel.test
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /hello
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: example-service
|
||||||
|
port:
|
||||||
|
number: 80
|
15
kubernetes/portainer/example-application/service.yaml
Normal file
15
kubernetes/portainer/example-application/service.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: example-service
|
||||||
|
labels:
|
||||||
|
app: example-app
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: example-app
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 5000
|
Loading…
x
Reference in New Issue
Block a user