refactor: Update deployment.yaml to use dynamic image repository and tag

This commit is contained in:
suyiiyii 2024-08-25 20:02:21 +08:00
parent 11f4736081
commit fe92bc750e
2 changed files with 22 additions and 36 deletions

View File

@ -18,7 +18,7 @@ spec:
app: backend app: backend
spec: spec:
containers: containers:
- image: ghcr.io/suyiiyii/sims:main - image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
name: sims name: sims
resources: {} resources: {}
env: env:

View File

@ -8,23 +8,17 @@ spring:
username: "" username: ""
password: "" password: ""
driverClassName: "" driverClassName: ""
jwt: jwt:
secret: "" secret: ""
replicaCount: 1 replicaCount: 1
image: image:
repository: nginx repository: ghcr.io/suyiiyii/sims
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: "" tag: v1.0.1
imagePullSecrets: [] imagePullSecrets: []
nameOverride: "" nameOverride: ""
fullnameOverride: "" fullnameOverride: ""
serviceAccount: serviceAccount:
# Specifies whether a service account should be created # Specifies whether a service account should be created
create: true create: true
@ -35,31 +29,28 @@ serviceAccount:
# The name of the service account to use. # The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template # If not set and create is true, a name is generated using the fullname template
name: "" name: ""
podAnnotations: {} podAnnotations: {}
podLabels: {} podLabels: {}
podSecurityContext: {} podSecurityContext: {}
# fsGroup: 2000 # fsGroup: 2000
securityContext: {} securityContext: {}
# capabilities: # capabilities:
# drop: # drop:
# - ALL # - ALL
# readOnlyRootFilesystem: true # readOnlyRootFilesystem: true
# runAsNonRoot: true # runAsNonRoot: true
# runAsUser: 1000 # runAsUser: 1000
service: service:
type: ClusterIP type: ClusterIP
port: 80 port: 80
ingress: ingress:
enabled: false enabled: false
className: "" className: ""
annotations: {} annotations: {}
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
hosts: hosts:
- host: chart-example.local - host: chart-example.local
paths: paths:
@ -69,18 +60,17 @@ ingress:
# - secretName: chart-example-tls # - secretName: chart-example-tls
# hosts: # hosts:
# - chart-example.local # - chart-example.local
resources: {} resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious # We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little # choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following # resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'. # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits: # limits:
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
# requests: # requests:
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
livenessProbe: livenessProbe:
httpGet: httpGet:
@ -90,14 +80,12 @@ readinessProbe:
httpGet: httpGet:
path: / path: /
port: http port: http
autoscaling: autoscaling:
enabled: false enabled: false
minReplicas: 1 minReplicas: 1
maxReplicas: 100 maxReplicas: 100
targetCPUUtilizationPercentage: 80 targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80
# Additional volumes on the output Deployment definition. # Additional volumes on the output Deployment definition.
volumes: [] volumes: []
# - name: foo # - name: foo
@ -112,7 +100,5 @@ volumeMounts: []
# readOnly: true # readOnly: true
nodeSelector: {} nodeSelector: {}
tolerations: [] tolerations: []
affinity: {} affinity: {}