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

Commit

Permalink
chore: Refactor project to have a deployment file for k8s and not onl…
Browse files Browse the repository at this point in the history
…y okd
  • Loading branch information
cmoulliard committed Dec 17, 2019
1 parent 72e63b5 commit c83bc47
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
if [[ "${CIRCLE_TAG}" =~ ${tagRE} ]]; then
VERSION=${BASH_REMATCH[1]}
docker build -t spring-boot-generator:${VERSION} -f docker/Dockerfile_generator --build-arg VERSION=${VERSION} --build-arg GITCOMMIT=$(git rev-parse --short HEAD 2>/dev/null) .
docker build -t spring-boot-generator:${VERSION} -f config/Dockerfile_generator --build-arg VERSION=${VERSION} --build-arg GITCOMMIT=$(git rev-parse --short HEAD 2>/dev/null) .
TAG_ID=$(docker images -q spring-boot-generator:${VERSION})
docker tag ${TAG_ID} quay.io/snowdrop/spring-boot-generator:${VERSION}
docker tag ${TAG_ID} quay.io/snowdrop/spring-boot-generator:latest
Expand Down
File renamed without changes.
64 changes: 64 additions & 0 deletions config/k8s/generator-application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
apiVersion: v1
kind: Deployment
metadata:
labels:
app: spring-boot-generator
name: spring-boot-generator
spec:
replicas: 1
selector:
app: spring-boot-generator
strategy:
rollingParams:
timeoutSeconds: 3600
type: Rolling
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
securityContext:
privileged: false
volumes:
- name: config-volume
configMap:
name: generator-configmap
---
apiVersion: v1
kind: Service
metadata:
labels:
app: spring-boot-generator
name: spring-boot-generator
spec:
ports:
- name: 8000-tcp
port: 8000
protocol: TCP
targetPort: 8080
type: ClusterIP
selector:
app: spring-boot-generator
File renamed without changes.

0 comments on commit c83bc47

Please sign in to comment.