UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 0a4e5c7e authored by Micah Nagel's avatar Micah Nagel
Browse files

fix minio

parent c662dcae
No related branches found
No related tags found
1 merge request!23Point to Minio BB Upstream
Pipeline #225330 passed
Showing
with 199 additions and 8 deletions
......@@ -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
### Added
- Added Minio security context
......
......@@ -4,6 +4,6 @@ dependencies:
version: 10.3.5
- name: minio-instance
repository: file://./deps/minio
version: 2.0.9-bb.5
digest: sha256:e14a571d09ffdc66826b46a727ead36511ea5a6b0e349cda36d217bafcd26210
generated: "2021-03-22T15:12:25.740669-06:00"
version: 2.0.9-bb.9
digest: sha256:655a9483cf53a24afb867a32f3bcdaedced200bb5cdefb93b5889f79486e8b55
generated: "2021-04-19T09:54:43.894362-06:00"
......@@ -2,7 +2,7 @@
apiVersion: v2
name: mattermost
type: application
version: "0.1.3-bb.1"
version: "0.1.3-bb.2"
appVersion: "5.32.1"
description: "Deployment of mattermost"
keywords:
......@@ -17,7 +17,7 @@ dependencies:
condition: postgresql.install
repository: file://./deps/postgresql
- name: minio-instance
version: 2.0.9-bb.5
version: 2.0.9-bb.9
alias: minio
condition: minio.install
repository: file://./deps/minio
File deleted
File added
No preview for this file type
{
"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
kind: Secret
metadata:
name: minio-creds-secret
name: default-minio-creds-secret
namespace: {{ .Release.Namespace }}
type: Opaque
data:
accesskey: {{ .Values.accessKey | b64enc }}
secretkey: {{ .Values.secretKey | b64enc }}
accesskey: bWluaW8= # base 64 encoded "minio" (echo -n 'minio' | base64)
secretkey: bWluaW8xMjM= # based 64 encoded "minio123" (echo -n 'minio123' | base64)
---
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
......@@ -27,7 +27,7 @@ volumeClaimTemplate:
accessModes: ReadWriteOnce
storage: 1Gi # scale down for dev
minioRootCreds: minio-creds-secret
minioRootCreds: default-minio-creds-secret
imagePullSecrets: [ ]
......
......@@ -105,4 +105,4 @@ spec:
external:
url: {{ .Values.fileStore.url | default (printf "%s:9000" .Values.minio.service.nameOverride) }}
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
kind: Secret
type: Opaque
metadata:
name: {{ include "mattermost.fullname" . }}-objstore-creds
name: mattermost-objstore-creds
namespace: {{ .Release.Namespace }}
labels:
{{ include "mattermost.labels" . | nindent 4 }}
......
......@@ -102,6 +102,10 @@ minio:
service:
nameOverride: "minio-mattermost-service"
# Specify the secret to the Mattermost created secret
minioRootCreds: mattermost-objstore-creds
# Credentials to populate the secret with
accessKey: minio
secretKey: minio#123 # default key, change this!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment