Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
chore: Convert the list of resources into individual files
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoulliard committed Dec 20, 2019
1 parent 04b256b commit e8ba0d4
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
41 changes: 41 additions & 0 deletions config/k8s/01_deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: spring-boot-generator
name: spring-boot-generator
spec:
selector:
matchLabels:
app: spring-boot-generator
template:
metadata:
labels:
app: spring-boot-generator
spec:
containers:
- env:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SERVER_PORT
value: '8080'
- name: CONFIGMAP_PATH
value: '/etc/config'
- name: LOG_LEVEL
value: 'info'
image: quay.io/snowdrop/spring-boot-generator:latest
imagePullPolicy: Always
name: spring-boot-generator
ports:
- containerPort: 8080
name: http
protocol: TCP
volumeMounts:
- name: config-volume
mountPath: /etc/config
volumes:
- name: config-volume
configMap:
name: spring-boot-generator
15 changes: 15 additions & 0 deletions config/k8s/02_service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: spring-boot-generator
name: spring-boot-generator
spec:
ports:
- name: 8000-tcp
port: 80
protocol: TCP
targetPort: 8080
type: ClusterIP
selector:
app: spring-boot-generator
19 changes: 19 additions & 0 deletions config/k8s/03_ingress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: "nginx"
name: spring-boot-generator
spec:
rules:
- host: generator.snowdrop.me
http:
paths:
- backend:
serviceName: spring-boot-generator
servicePort: 80
path: /
tls:
- hosts:
- generator.snowdrop.me
secretName: generator-snowdrop-me-tls

0 comments on commit e8ba0d4

Please sign in to comment.