Skip to content

Commit

Permalink
[Feat] Helm 차트 구성
Browse files Browse the repository at this point in the history
  • Loading branch information
jun6292 committed Oct 11, 2024
1 parent 20526f6 commit e7fad56
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
name: jenkins-inven-collector
description: A Helm chart for deploying the Jenkins Inventory Collector
version: 0.1.0
appVersion: "1.0"
12 changes: 12 additions & 0 deletions helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{/* Generate the full name of the application */}}
{{- define "my-app.name" -}}
{{- .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "my-app.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else }}
{{- .Chart.Name | trunc 63 | trimSuffix "-" -}}-{{ .Release.Name | trunc 63 | trimSuffix "-" }}
{{- end -}}
{{- end -}}
19 changes: 19 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "my-app.fullname" . }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ include "my-app.fullname" . }}
template:
metadata:
labels:
app: {{ include "my-app.fullname" . }}
spec:
containers:
- name: jenkins-inven-collector
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
ports:
- containerPort: 50051
11 changes: 11 additions & 0 deletions helm/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "my-app.fullname" . }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: 50051
selector:
app: {{ include "my-app.fullname" . }}
13 changes: 13 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
replicaCount: 2

image:
repository: chanjin/plugin-jenkins-inven-collector
tag: latest
pullPolicy: IfNotPresent

service:
type: ClusterIP
port: 50051

ingress:
enabled: false

0 comments on commit e7fad56

Please sign in to comment.