UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit b85ec979 authored by Michael Martin's avatar Michael Martin
Browse files

Merge branch 'add-wait-job' into 'main'

add wait job

See merge request !205
parents 9ee3048d 951f508f
No related branches found
Tags 6.0.3-bb.4
1 merge request!205add wait job
Pipeline #3631883 passed
......@@ -3,6 +3,12 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
---
## [6.0.3-bb.4] - 2024-09-25
### Changed
- Added wait job config
## [6.0.3-bb.3] - 2024-09-23
......
<!-- Warning: Do not manually edit this file. See notes on gluon + helm-docs at the end of this file for more information. -->
# minio-instance
![Version: 6.0.3-bb.3](https://img.shields.io/badge/Version-6.0.3--bb.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: RELEASE.2024-06-04T19-20-08Z](https://img.shields.io/badge/AppVersion-RELEASE.2024--06--04T19--20--08Z-informational?style=flat-square)
![Version: 6.0.3-bb.4](https://img.shields.io/badge/Version-6.0.3--bb.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: RELEASE.2024-06-04T19-20-08Z](https://img.shields.io/badge/AppVersion-RELEASE.2024--06--04T19--20--08Z-informational?style=flat-square)
A Helm chart for MinIO Operator
......@@ -259,6 +259,13 @@ helm install minio-instance chart/
| bbtests.scripts.secretEnvs[1].name | string | `"ACCESS_KEY"` | |
| bbtests.scripts.secretEnvs[1].valueFrom.secretKeyRef.name | string | `"{{ .Values.tenant.configSecret.name }}"` | |
| bbtests.scripts.secretEnvs[1].valueFrom.secretKeyRef.key | string | `"accesskey"` | |
| waitJob.enabled | bool | `true` | |
| waitJob.scripts.image | string | `"registry1.dso.mil/ironbank/opensource/kubernetes/kubectl:v1.29.6"` | |
| waitJob.permissions.apiGroups[0] | string | `"minio.min.io"` | |
| waitJob.permissions.apiGroups[1] | string | `"minio.min.io/v2"` | |
| waitJob.permissions.resources[0] | string | `"tenants"` | |
| waitJob.permissions.resources[1] | string | `"tenant"` | |
| waitJob.permissions.resources[2] | string | `"tenants.minio.min.io"` | |
## Contributing
......
apiVersion: v2
description: A Helm chart for MinIO Operator
name: minio-instance
version: '6.0.3-bb.3'
version: '6.0.3-bb.4'
appVersion: RELEASE.2024-06-04T19-20-08Z
keywords:
- storage
......@@ -27,3 +27,5 @@ annotations:
image: registry1.dso.mil/ironbank/opensource/minio/minio:RELEASE.2024-06-04T19-20-08Z
- name: operator-sidecar
image: registry1.dso.mil/ironbank/opensource/minio/operator-sidecar:v6.0.2
- name: kubectl
image: registry1.dso.mil/ironbank/opensource/kubernetes/kubectl:v1.29.6
{{- include "gluon.tests.cypress-configmap.overrides" (list . "minio-test.cypress-configmap") }}
{{- include "gluon.tests.cypress-configmap.overrides" (list . "minio-test.cypress-configmap") -}}
{{- define "minio-test.cypress-configmap" }}
metadata:
labels:
{{- include "minio-operator.labels" . | nindent 4 }}
{{- end }}
---
{{- include "gluon.tests.cypress-runner.overrides" (list . "minio-test.cypress-runner") -}}
{{ include "gluon.tests.cypress-runner.overrides" (list . "minio-test.cypress-runner") -}}
{{- define "minio-test.cypress-runner" -}}
metadata:
labels:
{{- include "minio-operator.labels" . | nindent 4 }}
{{- end }}
{{- end }}
\ No newline at end of file
{{- include "gluon.wait.wait-job-configmap.overrides" (list . "minio-wait.wait-configmap") }}
{{- define "minio-wait.wait-configmap" }}
metadata:
labels:
{{- include "minio-operator.labels" . | nindent 4 }}
{{- end }}
---
{{ include "gluon.wait.wait-job.overrides" (list . "minio-wait.wait-job") }}
{{- define "minio-wait.wait-job" }}
metadata:
labels:
{{- include "minio-operator.labels" . | nindent 4 }}
{{- end }}
---
{{ include "gluon.wait.wait-job-sa.overrides" (list . "minio-wait.wait-job-sa") }}
{{- define "minio-wait.wait-job-sa" }}
metadata:
labels:
{{- include "minio-operator.labels" . | nindent 4 }}
{{- end }}
---
{{ include "gluon.wait.wait-job-role.overrides" (list . "minio-wait.wait-job-role") }}
{{- define "minio-wait.wait-job-role" }}
metadata:
labels:
{{- include "minio-operator.labels" . | nindent 4 }}
{{- end }}
---
{{ include "gluon.wait.wait-job-rolebinding.overrides" (list . "minio-wait.wait-job-rolebinding") }}
{{- define "minio-wait.wait-job-rolebinding" }}
metadata:
labels:
{{- include "minio-operator.labels" . | nindent 4 }}
{{- end }}
\ No newline at end of file
......@@ -5,7 +5,7 @@ metadata:
{{- include "minio-operator.labels" . | nindent 4 }}
{{- end }}
---
{{- include "gluon.tests.script-runner.overrides" (list . "minio-test.script-runner") -}}
{{ include "gluon.tests.script-runner.overrides" (list . "minio-test.script-runner") -}}
{{- define "minio-test.script-runner" -}}
metadata:
labels:
......
......@@ -678,3 +678,16 @@ bbtests:
secretKeyRef:
name: "{{ .Values.tenant.configSecret.name }}"
key: accesskey
waitJob:
enabled: true
scripts:
image: registry1.dso.mil/ironbank/opensource/kubernetes/kubectl:v1.29.6
permissions:
apiGroups:
- minio.min.io
- minio.min.io/v2
resources:
- tenants
- tenant
- tenants.minio.min.io
\ No newline at end of file
#!/bin/bash
timeElapsed=0
while true; do
resourceHealth=$(kubectl get tenant -n minio -o jsonpath='{.items[0].status.healthStatus}')
if [[ $resourceHealth == "green" ]]; then # Update with desired health/output of the jsonpath
echo "minio custom resource creation finished"
break
fi
sleep 5
timeElapsed=$(($timeElapsed+5))
if [[ $timeElapsed -ge 600 ]]; then
echo "timeout waiting 600 seconds for minio resource creation, running describe..." 1>&2
kubectl describe tenant -n minio 1>&2
exit 1
fi
done
bbtests:
enabled: true
waitJob:
enabled: true
tenant:
pools:
- servers: 2
......
#!/bin/sh
wait_project() {
timeElapsed=0
while true; do
resourceHealth=$(kubectl get tenant -n minio -o jsonpath='{.items[0].status.healthStatus}' | xargs) # Update with the resource to check and jsonpath
if [[ $resourceHealth == "green" ]]; then # Update with desired health/output of the jsonpath
echo "minio custom resource creation finished"
break
fi
sleep 5
timeElapsed=$(($timeElapsed+5))
if [[ $timeElapsed -ge 600 ]]; then
echo "timeout waiting 600 seconds for minio resource creation, running describe..." 1>&2
kubectl describe tenant -n minio 1>&2
exit 1
fi
done
}
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