Commit 2f22f200 authored by Vũ Hoàng Nam's avatar Vũ Hoàng Nam

Add minio subchart

parent 25c5da41
...@@ -21,4 +21,4 @@ version: 0.1.0 ...@@ -21,4 +21,4 @@ version: 0.1.0
# incremented each time you make changes to the application. Versions are not expected to # 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. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: "1.0.0" appVersion: "2024.1.16"
Webapp is deploying, just wait a few minutes.
\ No newline at end of file
{{/*
Expand the name of the chart.
*/}}
{{- define "minio.name" -}}
{{- default .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "minio.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "minio.labels" -}}
helm.sh/chart: {{ include "minio.chart" . }}
{{ include "minio.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "minio.selectorLabels" -}}
app.kubernetes.io/name: {{ include "minio.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
...@@ -8,28 +8,35 @@ ...@@ -8,28 +8,35 @@
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
name: {{ include "minio.name" . }}
namespace: {{ .Values.namespace }}
labels: labels:
app: minio {{- include "minio.labels" . | nindent 4 }}
name: minio
namespace: minio-dev # Change this value to match the namespace metadata.name
spec: spec:
containers: containers:
- name: minio - name: {{ .Chart.Name }}
image: quay.io/minio/minio:latest image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
pullPolicy: {{ .Values.pullPolicy }}
resources: resources:
limits: limits:
memory: "2048Mi" memory: {{ .Values.limits.memory }}
cpu: "2000m" cpu: {{ .Values.limits.cpu }}
{{- with .Values.command }}
command: command:
- /bin/bash {{- toYaml . | nindent 6 -}}
- -c {{- end -}}
{{- with .Values.args }}
args: args:
- minio server /data --console-address :9090 {{- toYaml . | nindent 6 -}}
volumeMounts: {{- end -}}
- mountPath: /data
name: localvolume
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 6 -}}
{{- end -}}
{{- with .Values.volumes }}
volumes: volumes:
- name: localvolume {{- toYaml . | nindent 4 -}}
persistentVolumeClaim: {{- end -}}
claimName: minio-pvc \ No newline at end of file
\ No newline at end of file
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: minio-dev # Change this value if you want a different namespace name name: {{ .Values.namespace }}
labels: labels:
name: minio-dev # Change this value to match metadata.name {{- include "minio.labels" . | nindent 4 -}}
\ No newline at end of file \ No newline at end of file
apiVersion: v1 apiVersion: v1
kind: PersistentVolume kind: PersistentVolume
metadata: metadata:
name: minio-pv name: "{{ include "minio.name" . }}-pv"
spec: spec:
capacity: capacity:
storage: 1024Mi storage: {{ .Values.persistence.storage }}
volumeMode: Filesystem volumeMode: {{ .Values.persistence.volumeMode }}
persistentVolumeReclaimPolicy: {{ .Values.persistence.persistentVolumeReclaimPolicy }}
storageClassName: ""
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
storageClassName: ""
persistentVolumeReclaimPolicy: Recycle
nfs: nfs:
path: /var/nfs/k8s path: {{ .Values.persistence.nfs.path }}
server: 192.168.67.9 server: {{ .Values.persistence.nfs.server }}
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: minio-pvc name: "{{ include "minio.name" . }}-pvc"
namespace: minio-dev namespace: {{ .Values.namespace }}
labels:
{{- include "minio.labels" . | nindent 4 }}
spec: spec:
resources: resources:
requests: requests:
storage: 1000Mi storage: {{ .Values.persistenceClaim.storage }}
volumeMode: Filesystem volumeMode: {{ .Values.persistenceClaim.volumeMode }}
storageClassName: "" storageClassName: ""
volumeName: minio-pv # Specific PV to PVC connect
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
volumeName: "{{ include "minio.name" . }}-pv"
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: minio-svc name: {{ include "minio.name" . }}
namespace: minio-dev namespace: {{ .Values.namespace }}
spec: spec:
type: NodePort type: {{ .Values.service.type }}
selector:
app: minio
ports: ports:
- port: 9090 - port: {{ .Values.service.port }}
nodePort: 30001 nodePort: {{ .Values.service.nodePort }}
targetPort: 9090 targetPort: {{ .Values.service.targetPort }}
selector:
{{- include "minio.selectorLabels" . | nindent 4 -}}
# Default values for minio. # Default values for minio.
# This is a YAML-formatted file. # This is a YAML-formatted file.
# Declare variables to be passed into your templates. # Declare variables to be passed into your templates.
namespace: minio-dev
replicaCount: 1 # Deloyment
image: image:
repository: nginx repository: quay.io/minio/minio
tag: latest
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: [] limits:
nameOverride: "" memory: "2024Mi"
fullnameOverride: "" cpu: "2000m"
serviceAccount: command:
# Specifies whether a service account should be created - /bin/bash
create: true - -c
# Automatically mount a ServiceAccount's API credentials?
automount: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: {} args:
podLabels: {} - minio server /data --console-address :9090
podSecurityContext: {} volumeMounts:
# fsGroup: 2000 - mountPath: /data
name: localvolume
securityContext: {} volumes:
# capabilities: - name: localvolume
# drop: persistentVolumeClaim:
# - ALL claimName: minio-pvc
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
# Service
service: service:
type: ClusterIP type: NodePort
port: 80 port: 9090
nodePort: 30001
ingress: targetPort: 9090
enabled: false
className: "" # Persistent Volume Claim
annotations: {} persistenceClaim:
# kubernetes.io/ingress.class: nginx storage: 1024Mi
# kubernetes.io/tls-acme: "true" volumeMode: Filesystem
hosts: storageClassName: ""
- host: chart-example.local accessModes: ReadWriteOnce
paths:
- path: / # Persistent Volume
pathType: ImplementationSpecific persistence:
tls: [] storage: 1024Mi
# - secretName: chart-example-tls volumeMode: Filesystem
# hosts: accessModes: ReadWriteOnce
# - chart-example.local persistentVolumeReclaimPolicy: Recycle
nfs: # NFS server detail
resources: {} path: /var/nfs/k8s
# We usually recommend not to specify default resources and to leave this as a conscious server: 192.168.67.9
# choice for the user. This also increases chances charts run on environments with little \ No newline at end of file
# 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:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
# Additional volumes on the output Deployment definition.
volumes: []
# - name: foo
# secret:
# secretName: mysecret
# optional: false
# Additional volumeMounts on the output Deployment definition.
volumeMounts: []
# - name: foo
# mountPath: "/etc/foo"
# readOnly: true
nodeSelector: {}
tolerations: []
affinity: {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment