mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-29 18:55:49 +00:00
Merge b79d1843b1
into e8e37b35c3
This commit is contained in:
commit
fd1b15fb86
8 changed files with 136 additions and 2 deletions
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Dockerfile
|
||||
FROM docker.io/library/gradle:7.5.1-jdk17 AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# add project
|
||||
ADD . /app/
|
||||
|
||||
RUN gradle clean bootJar
|
||||
|
||||
FROM docker.io/library/eclipse-temurin:11-jre-focal AS app
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/build/libs/spring-petclinic-3.0.0.jar .
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
# server run
|
||||
ENTRYPOINT ["java"]
|
||||
CMD ["-jar", "/app/spring-petclinic-3.0.0.jar"]
|
|
@ -1,5 +1,5 @@
|
|||
plugins {
|
||||
id 'org.springframework.boot' version '3.0.0'
|
||||
id 'org.springframework.boot' version '2.7.6'
|
||||
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
|
||||
id 'java'
|
||||
}
|
||||
|
|
23
chart/.helmignore
Normal file
23
chart/.helmignore
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
24
chart/Chart.yaml
Normal file
24
chart/Chart.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
apiVersion: v2
|
||||
name: chart
|
||||
description: A Helm chart for Kubernetes
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "1.16.0"
|
43
chart/templates/deployment.yaml
Normal file
43
chart/templates/deployment.yaml
Normal file
|
@ -0,0 +1,43 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.app.name }}
|
||||
labels:
|
||||
app: {{ .Values.app.name }}
|
||||
spec:
|
||||
replicas: {{ .Values.app.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Values.app.name }}
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 1
|
||||
maxSurge: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Values.app.name }}
|
||||
spec:
|
||||
{{- with .Values.app.hostAliases }}
|
||||
hostAliases:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: app
|
||||
imagePullPolicy: Always
|
||||
image: {{ .Values.app.image }}
|
||||
{{- with .Values.app.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
command: [ "java" ]
|
||||
args:
|
||||
- "-jar"
|
||||
- "spring-petclinic-3.0.0.jar"
|
||||
{{- with .Values.app.env }}
|
||||
env:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 8080
|
15
chart/templates/service.yaml
Normal file
15
chart/templates/service.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Values.app.name }}
|
||||
name: {{ .Values.app.name }}-svc
|
||||
spec:
|
||||
ports:
|
||||
- name: petclinic
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: {{ .Values.app.name }}
|
||||
type: {{ .Values.app.service.type }}
|
9
chart/values.yaml
Normal file
9
chart/values.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
app:
|
||||
name: petclinic-k8s
|
||||
profile:
|
||||
replicaCount: 1
|
||||
hostAliases: []
|
||||
image: doubles.kr-central-1.kcr.dev/bella-test/test-img:latest
|
||||
resources: {}
|
||||
service:
|
||||
type: LoadBalancer
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
zipStorePath=wrapper/dist
|
||||
|
|
Loading…
Reference in a new issue