UNCLASSIFIED

Commit de844cee authored by Micah Nagel's avatar Micah Nagel 💰
Browse files

Merge branch 'minio-upstream' into 'main'

Point to Minio BB Upstream

See merge request !23
parents 4bd482c7 b1d787d8
Pipeline #225341 passed with stages
in 3 minutes and 43 seconds
...@@ -4,6 +4,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ...@@ -4,6 +4,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
--- ---
## [0.1.3-bb.2] - 2021-04-19
### Changed
- Pulled in official BB Minio via kpt
- Refactored the Minio connection secret
## [0.1.3-bb.1] - 2021-04-15 ## [0.1.3-bb.1] - 2021-04-15
### Added ### Added
- Added Minio security context - Added Minio security context
......
...@@ -4,6 +4,6 @@ dependencies: ...@@ -4,6 +4,6 @@ dependencies:
version: 10.3.5 version: 10.3.5
- name: minio-instance - name: minio-instance
repository: file://./deps/minio repository: file://./deps/minio
version: 2.0.9-bb.5 version: 2.0.9-bb.9
digest: sha256:e14a571d09ffdc66826b46a727ead36511ea5a6b0e349cda36d217bafcd26210 digest: sha256:655a9483cf53a24afb867a32f3bcdaedced200bb5cdefb93b5889f79486e8b55
generated: "2021-03-22T15:12:25.740669-06:00" generated: "2021-04-19T09:54:43.894362-06:00"
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
apiVersion: v2 apiVersion: v2
name: mattermost name: mattermost
type: application type: application
version: "0.1.3-bb.1" version: "0.1.3-bb.2"
appVersion: "5.32.1" appVersion: "5.32.1"
description: "Deployment of mattermost" description: "Deployment of mattermost"
keywords: keywords:
...@@ -17,7 +17,7 @@ dependencies: ...@@ -17,7 +17,7 @@ dependencies:
condition: postgresql.install condition: postgresql.install
repository: file://./deps/postgresql repository: file://./deps/postgresql
- name: minio-instance - name: minio-instance
version: 2.0.9-bb.5 version: 2.0.9-bb.9
alias: minio alias: minio
condition: minio.install condition: minio.install
repository: file://./deps/minio repository: file://./deps/minio
...@@ -9,7 +9,7 @@ description: |- ...@@ -9,7 +9,7 @@ description: |-
type: application type: application
version: 2.0.9-bb.5 version: 2.0.9-bb.9
appVersion: RELEASE.2020-11-19T23-48-16Z appVersion: RELEASE.2020-11-19T23-48-16Z
......
...@@ -5,7 +5,7 @@ metadata: ...@@ -5,7 +5,7 @@ metadata:
upstream: upstream:
type: git type: git
git: git:
commit: 99d751b096154d9c5820af4a84ff4a0f99f4f7b7 commit: a8ef3702468317396a58ed94bb1823f9d4ae59cf
repo: https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio repo: https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio
directory: /chart directory: /chart
ref: 2.0.9-bb.5 ref: 2.0.9-bb.9
{
"pluginsFile": false,
"supportFile": false,
"fixturesFolder": false
}
describe('Basic Minio', function() {
it('Check Minio UI is accessible', function() {
cy.visit(Cypress.env('url'))
})
})
describe('Minio Login', function() {
it('Check Minio Login', function() {
cy.visit(Cypress.env('url')+"/minio/login")
// Fill the username
cy.get('[name="username"]')
.type(Cypress.env('accesskey'))
.should('have.value', Cypress.env('accesskey'));
// Fill the password
cy.get('[name="password"]')
.type(Cypress.env('secretkey'))
.should('have.value', Cypress.env('secretkey'));
// Locate and submit the form
cy.get('form').submit();
// Verify the app redirected you to the homepage
cy.location('pathname', { timeout: 10000 }).should('eq', '/minio/');
// Verify the page title is "Home"
cy.title().should('eq', 'MinIO Browser');
})
})
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
name: minio-creds-secret name: default-minio-creds-secret
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
type: Opaque type: Opaque
data: data:
accesskey: {{ .Values.accessKey | b64enc }} accesskey: bWluaW8= # base 64 encoded "minio" (echo -n 'minio' | base64)
secretkey: {{ .Values.secretKey | b64enc }} secretkey: bWluaW8xMjM= # based 64 encoded "minio123" (echo -n 'minio123' | base64)
---
...@@ -4,11 +4,25 @@ kind: VirtualService ...@@ -4,11 +4,25 @@ kind: VirtualService
metadata: metadata:
name: {{ template "minio.fullname" . }} name: {{ template "minio.fullname" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
app: {{ template "minio.fullname" . }}
{{- include "minio.labels" . | nindent 4 }}
{{- if .Values.istio.virtualService.labels }}
{{ toYaml .Values.istio.virtualservice.labels | indent 4 }}
{{- end }}
{{- if .Values.istio.virtualService.annotations }}
annotations:
{{ toYaml .Values.istio.virtualService.annotations | indent 2 }}
{{- end }}
spec: spec:
gateways: gateways:
- istio-system/main {{- range .Values.istio.virtualService.gateways }}
- {{ . }}
{{- end }}
hosts: hosts:
- {{ .Values.istio.virtualService.name }}.{{ .Values.hostname }} {{- range .Values.istio.virtualService.hosts }}
- {{ tpl . $}}
{{- end }}
http: http:
- match: - match:
- uri: - uri:
...@@ -32,4 +46,3 @@ spec: ...@@ -32,4 +46,3 @@ spec:
port: port:
number: {{ .Values.service.port }} number: {{ .Values.service.port }}
{{- end }} {{- end }}
...@@ -19,6 +19,14 @@ spec: ...@@ -19,6 +19,14 @@ spec:
prometheus.io/scrape: "true" prometheus.io/scrape: "true"
{{- toYaml . | nindent 6 }} {{- toYaml . | nindent 6 }}
{{- end }} {{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
## Registry location and Tag to download MinIO Server image ## Registry location and Tag to download MinIO Server image
image: {{ .Values.image.name }}:{{ .Values.image.tag }} image: {{ .Values.image.name }}:{{ .Values.image.tag }}
......
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ .Release.Name }}-cypress-test-configmap"
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-weight": "5"
sidecar.istio.io/inject: "false"
labels:
helm-test: enabled
{{- include "minio.labels" . | nindent 4 }}
namespace: {{ .Release.Namespace }}
data:
{{ (.Files.Glob "cypress/*").AsConfig | indent 2 }}
kind: Pod
apiVersion: v1
metadata:
name: "{{ .Release.Name }}-ui-test"
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-weight": "20"
sidecar.istio.io/inject: "false"
labels:
helm-test: enabled
{{- include "minio.labels" . | nindent 4 }}
spec:
initContainers:
- name: copier
image: registry.dso.mil/platform-one/big-bang/pipeline-templates/pipeline-templates/cypress/included:5.0.0
command:
- "/bin/bash"
- "-c"
- |
ls -la /src/
cp /src/cypress.json /dest/
mkdir -p /dest/cypress/integration/
cp /src/*.js /dest/cypress/integration/
ls -la /dest/
ls -la /dest/cypress/integration/
volumeMounts:
- name: cypress-tests
mountPath: /src
- name: workdir
mountPath: /dest
containers:
- name: {{ .Release.Name }}-ui-test
image: registry.dso.mil/platform-one/big-bang/pipeline-templates/pipeline-templates/cypress/included:5.0.0
imagePullPolicy: {{ .Values.image.imagePullPolicy | quote }}
workingDir: /e2e
env:
- name: HOST
value: {{ .Values.service.port | quote }}
- name: MINIO_HOST
value: {{ include "minio.serviceName" . }}
- name: cypress_secretkey
valueFrom:
secretKeyRef:
name: {{ .Values.minioRootCreds }}
key: secretkey
- name: cypress_accesskey
valueFrom:
secretKeyRef:
name: {{ .Values.minioRootCreds }}
key: accesskey
- name: cypress_url
value: "http://{{ include "minio.serviceName" . }}:{{ .Values.service.port }}"
args:
- "--"
- "--reporter-options=list"
- "--reporter=spec"
volumeMounts:
- name: workdir
mountPath: /e2e/
restartPolicy: Never
volumes:
- name: cypress-tests
configMap:
name: "{{ .Release.Name }}-cypress-test-configmap"
- name: workdir
emptyDir: {}
kind: Pod
apiVersion: v1
metadata:
name: "{{ .Release.Name }}-access-test"
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-weight": "10"
sidecar.istio.io/inject: "false"
labels:
helm-test: enabled
{{- include "minio.labels" . | nindent 4 }}
spec:
containers:
- name: {{ .Release.Name }}-credentials-test
image: {{.Values.mcImage }}
imagePullPolicy: {{ .Values.image.imagePullPolicy | quote }}
env:
- name: MINIO_PORT
value: {{ .Values.service.port | quote }}
- name: MINIO_HOST
value: {{ include "minio.serviceName" . }}
- name: SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.minioRootCreds }}
key: secretkey
- name: ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.minioRootCreds }}
key: accesskey
command:
- /bin/bash
- -ec
- |-
set -x
mc config host add bigbang http://${MINIO_HOST}:${MINIO_PORT} ${ACCESS_KEY} ${SECRET_KEY}
# cleanup from pervious runs
mc rb bigbang/foobar --force || true
mc mb bigbang/foobar
mc ls bigbang/foobar
base64 /dev/urandom | head -c 10000000 > /tmp/file.txt
md5sum /tmp/file.txt > /tmp/filesig
mc cp /tmp/file.txt bigbang/foobar/file.txt
mc ls bigbang/foobar/file.txt
mc cp bigbang/foobar/file.txt /tmp/file.txt
mc rb bigbang/foobar --force
md5sum -c /tmp/filesig
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 4}}
{{- end }}
restartPolicy: Never
\ No newline at end of file
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
replicas: replicas:
count: 1 count: 1
accessKey: minio hostname: bigbang.dev
secretKey: minio#123 # default key, change this!
nameOverride: "" nameOverride: ""
fullnameOverride: "" fullnameOverride: ""
...@@ -29,7 +27,7 @@ volumeClaimTemplate: ...@@ -29,7 +27,7 @@ volumeClaimTemplate:
accessModes: ReadWriteOnce accessModes: ReadWriteOnce
storage: 1Gi # scale down for dev storage: 1Gi # scale down for dev
minioRootCreds: minio-creds-secret minioRootCreds: default-minio-creds-secret
imagePullSecrets: [ ] imagePullSecrets: [ ]
...@@ -55,8 +53,18 @@ istio: ...@@ -55,8 +53,18 @@ istio:
enabled: false enabled: false
virtualService: virtualService:
enabled: true enabled: true
name: minio annotations: {}
labels: {}
gateways:
- istio-system/main
hosts:
- minio.{{ .Values.hostname }}
service: ""
port: ""
monitoring: monitoring:
enabled: false enabled: false
namespace: monitoring namespace: monitoring
mcImage: registry1.dso.mil/ironbank/opensource/minio/mc:RELEASE.2021-03-23T05-46-11Z
\ No newline at end of file
...@@ -105,4 +105,4 @@ spec: ...@@ -105,4 +105,4 @@ spec:
external: external:
url: {{ .Values.fileStore.url | default (printf "%s:9000" .Values.minio.service.nameOverride) }} url: {{ .Values.fileStore.url | default (printf "%s:9000" .Values.minio.service.nameOverride) }}
bucket: {{ .Values.fileStore.bucket | default "mattermost" }} bucket: {{ .Values.fileStore.bucket | default "mattermost" }}
secret: {{ .Values.fileStore.secret | default "minio-creds-secret" }} secret: {{ .Values.fileStore.secret | default "mattermost-objstore-creds" }}
...@@ -3,7 +3,7 @@ apiVersion: v1 ...@@ -3,7 +3,7 @@ apiVersion: v1
kind: Secret kind: Secret
type: Opaque type: Opaque
metadata: metadata:
name: {{ include "mattermost.fullname" . }}-objstore-creds name: mattermost-objstore-creds
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
{{ include "mattermost.labels" . | nindent 4 }} {{ include "mattermost.labels" . | nindent 4 }}
......
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