diff --git a/CHANGELOG.md b/CHANGELOG.md index 52561e92bb10ed7889245beeb533af4a9cd06e59..183681b8a5b705ca86d5ba1a072f9a1445171054 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ #minio +2.0.9-bb.2 +Repository cleanup + +2.0.9-bb.1 +Refactor to deploy with helm chart in Big Bang Umbrella. + 0.1.1 (06//2020) Manifests for deploying minio 1.0.7 diff --git a/CODEOWNERS.txt b/CODEOWNERS.txt index 727de5d84662855ecdc6ef6205eb513dbcaa80de..464fe09d6d187ea749116206f5c4a55e3866f75d 100644 --- a/CODEOWNERS.txt +++ b/CODEOWNERS.txt @@ -1 +1 @@ -* @big-bang @LynnStill +* @LynnStill @kevin.wilder @branden.cobb diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 090789142cad798fef74b3ede2af8618033f9efb..78db296fa68ecd7b4c036e49bf6ed1718dcebb37 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Thanks for contributing to this repository! +Thanks for contributing to this repository This repository follows the following conventions: diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 1faeae47ccb83cabf5452a08bedabb4db348ba6f..2c94423a6507bc6df0e7222a584a9f2b647e257f 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -9,7 +9,7 @@ description: |- type: application -version: 1.0.0 +version: 2.0.9-bb.2 appVersion: 2.0.9 diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl new file mode 100644 index 0000000000000000000000000000000000000000..f415bbf27ff03843993d5dd0fdaad712eb3844b2 --- /dev/null +++ b/chart/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "minio.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "minio.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- 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 }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "minio.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "minio.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/chart/templates/minio-vs.yaml b/chart/templates/minio-vs.yaml new file mode 100644 index 0000000000000000000000000000000000000000..156e3d476c497693b1a1a8752165552548934232 --- /dev/null +++ b/chart/templates/minio-vs.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.istio.enabled .Values.istio.virtualService.enabled -}} +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: {{ template "minio.fullname" . }} + namespace: {{ .Release.Namespace }} +spec: + gateways: + - istio-system/main + hosts: + - {{ .Values.istio.virtualService.name }}.{{ .Values.hostname }} + http: + - route: + - destination: + host: {{ include "minio.fullname" . }} + port: + number: {{ .Values.service.port }} +{{- end }} + diff --git a/chart/templates/minioinstance.yaml b/chart/templates/minioinstance.yaml index c5637d72b18b693b43dbee4eb15c60babfd8a5ac..40306e680b01588783d1084417e2d5d3f81df23a 100644 --- a/chart/templates/minioinstance.yaml +++ b/chart/templates/minioinstance.yaml @@ -1,7 +1,7 @@ apiVersion: operator.min.io/v1 kind: MinIOInstance metadata: - name: minio + name: {{ include "minio.fullname" . }} ## If specified, MinIOInstance pods will be dispatched by specified scheduler. ## If not specified, the pod will be dispatched by default scheduler. # scheduler: @@ -11,14 +11,18 @@ spec: metadata: ## Optionally pass labels to be applied to the statefulset pods labels: - app: minio + {{- include "minio.labels" . | nindent 6 }} + {{- with .Values.podAnnotations }} annotations: prometheus.io/path: /minio/prometheus/metrics prometheus.io/port: "9000" prometheus.io/scrape: "true" + {{- toYaml . | nindent 6 }} + {{- end }} + ## Registry location and Tag to download MinIO Server image image: {{ .Values.image.name }}:{{ .Values.image.tag }} - serviceAccountName: {{ .Values.serviceAccountName }} + serviceAccountName: {{ include "minio.serviceAccountName" . }} ## A ClusterIP Service will be created with the given name serviceName: minio-internal-service zones: diff --git a/chart/templates/service-account.yaml b/chart/templates/service-account.yaml index cb910dc4ccf910cba0804d8ab2f18f1302b06995..7d2de011d52fb972e246a76957d203015ab6873b 100644 --- a/chart/templates/service-account.yaml +++ b/chart/templates/service-account.yaml @@ -1,7 +1,15 @@ +{{- if .Values.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.serviceAccountName }} + name: {{ include "minio.serviceAccountName" . }} namespace: {{ .Release.Namespace }} + labels: + {{- include "minio.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 2 }} +{{- end }} diff --git a/chart/templates/service.yaml b/chart/templates/service.yaml index e2cd82ed790c3fdfa34932a7429fd9206063c5e1..7be34e0d3f71fb5372f3da2723f12fac270a875c 100644 --- a/chart/templates/service.yaml +++ b/chart/templates/service.yaml @@ -1,15 +1,15 @@ apiVersion: v1 kind: Service metadata: - name: minio-service + name: {{ include "minio.fullname" . }} + labels: + {{- include "minio.labels" . | nindent 4 }} spec: - type: ClusterIP + type: {{ .Values.service.type }} ports: - - port: 9000 + - port: {{ .Values.service.port }} targetPort: 9000 protocol: TCP - # Optional field - # By default and for convenience, the Kubernetes control plane will allocate a port from a range (default: 30000-32767) - # nodePort: 30007 + name: http selector: - app: minio + {{- include "minio.selectorLabels" . | nindent 4 }} diff --git a/chart/values.yaml b/chart/values.yaml index 2f2c57e9298d8b21221d5c2f03912642a1b89cc1..1e6dff842c74d705b08eec5ba26b00ad724a8a33 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1,7 +1,14 @@ -# Configure number of MinIO Operator Deployment Replicas +# +## Default values for minio instance creation. +## This is a YAML-formatted file. +## Declare variables to be passed into your templates. +## Configure number of MinIO Operator Deployment Replicas replicas: count: 1 +nameOverride: "" +fullnameOverride: "" + # Configure repo and tag of MinIO Operator Image image: name: registry1.dso.mil/ironbank/opensource/minio/minio @@ -23,4 +30,25 @@ minioUICreds: default-minio-creds-secret imagePullSecrets: [ ] -serviceAccountName: minio-service-account \ No newline at end of file +serviceAccount: + # Specifies whether a service account should be created + create: 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: "" + +service: + type: ClusterIP + port: 9000 + +podAnnotations: {} + +istio: + enabled: true + virtualService: + enabled: true + name: minio + +