-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d00537
commit 1f28881
Showing
96 changed files
with
2,589 additions
and
225 deletions.
There are no files selected for viewing
111 changes: 111 additions & 0 deletions
111
.../test-enterprise-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
--- | ||
# Source: mimir-distributed/charts/minio/templates/configmap.yaml | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: test-enterprise-values-minio | ||
labels: | ||
app: minio | ||
chart: minio-8.0.10 | ||
release: test-enterprise-values | ||
heritage: Helm | ||
data: | ||
initialize: |- | ||
#!/bin/sh | ||
set -e ; # Have script exit in the event of a failed command. | ||
MC_CONFIG_DIR="/etc/minio/mc/" | ||
MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" | ||
# connectToMinio | ||
# Use a check-sleep-check loop to wait for Minio service to be available | ||
connectToMinio() { | ||
SCHEME=$1 | ||
ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts | ||
set -e ; # fail if we can't read the keys. | ||
ACCESS=$(cat /config/accesskey) ; SECRET=$(cat /config/secretkey) ; | ||
set +e ; # The connections to minio are allowed to fail. | ||
echo "Connecting to Minio server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; | ||
MC_COMMAND="${MC} config host add myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; | ||
$MC_COMMAND ; | ||
STATUS=$? ; | ||
until [ $STATUS = 0 ] | ||
do | ||
ATTEMPTS=`expr $ATTEMPTS + 1` ; | ||
echo \"Failed attempts: $ATTEMPTS\" ; | ||
if [ $ATTEMPTS -gt $LIMIT ]; then | ||
exit 1 ; | ||
fi ; | ||
sleep 2 ; # 1 second intervals between attempts | ||
$MC_COMMAND ; | ||
STATUS=$? ; | ||
done ; | ||
set -e ; # reset `e` as active | ||
return 0 | ||
} | ||
# checkBucketExists ($bucket) | ||
# Check if the bucket exists, by using the exit code of `mc ls` | ||
checkBucketExists() { | ||
BUCKET=$1 | ||
CMD=$(${MC} ls myminio/$BUCKET > /dev/null 2>&1) | ||
return $? | ||
} | ||
# createBucket ($bucket, $policy, $purge) | ||
# Ensure bucket exists, purging if asked to | ||
createBucket() { | ||
BUCKET=$1 | ||
POLICY=$2 | ||
PURGE=$3 | ||
VERSIONING=$4 | ||
# Purge the bucket, if set & exists | ||
# Since PURGE is user input, check explicitly for `true` | ||
if [ $PURGE = true ]; then | ||
if checkBucketExists $BUCKET ; then | ||
echo "Purging bucket '$BUCKET'." | ||
set +e ; # don't exit if this fails | ||
${MC} rm -r --force myminio/$BUCKET | ||
set -e ; # reset `e` as active | ||
else | ||
echo "Bucket '$BUCKET' does not exist, skipping purge." | ||
fi | ||
fi | ||
# Create the bucket if it does not exist | ||
if ! checkBucketExists $BUCKET ; then | ||
echo "Creating bucket '$BUCKET'" | ||
${MC} mb myminio/$BUCKET | ||
else | ||
echo "Bucket '$BUCKET' already exists." | ||
fi | ||
# set versioning for bucket | ||
if [ ! -z $VERSIONING ] ; then | ||
if [ $VERSIONING = true ] ; then | ||
echo "Enabling versioning for '$BUCKET'" | ||
${MC} version enable myminio/$BUCKET | ||
elif [ $VERSIONING = false ] ; then | ||
echo "Suspending versioning for '$BUCKET'" | ||
${MC} version suspend myminio/$BUCKET | ||
fi | ||
else | ||
echo "Bucket '$BUCKET' versioning unchanged." | ||
fi | ||
# At this point, the bucket should exist, skip checking for existence | ||
# Set policy on the bucket | ||
echo "Setting policy of bucket '$BUCKET' to '$POLICY'." | ||
${MC} policy set $POLICY myminio/$BUCKET | ||
} | ||
# Try connecting to Minio instance | ||
scheme=http | ||
connectToMinio $scheme | ||
# Create the buckets | ||
createBucket mimir-tsdb none false | ||
createBucket mimir-ruler none false | ||
createBucket enterprise-metrics-tsdb none false | ||
createBucket enterprise-metrics-admin none false | ||
createBucket enterprise-metrics-ruler none false |
72 changes: 72 additions & 0 deletions
72
...test-enterprise-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
# Source: mimir-distributed/charts/minio/templates/deployment.yaml | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: test-enterprise-values-minio | ||
labels: | ||
app: minio | ||
chart: minio-8.0.10 | ||
release: test-enterprise-values | ||
heritage: Helm | ||
spec: | ||
strategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxSurge: 100% | ||
maxUnavailable: 0 | ||
selector: | ||
matchLabels: | ||
app: minio | ||
release: test-enterprise-values | ||
template: | ||
metadata: | ||
name: test-enterprise-values-minio | ||
labels: | ||
app: minio | ||
release: test-enterprise-values | ||
annotations: | ||
checksum/secrets: aac2dea246043210c2649ffaf6c6ea57cd94d0aaf2b21759b8b38a093096478e | ||
checksum/config: 8109517e3e9f729fb84cca8217b59099354497df0ca310f4e4b07d4951b02dc4 | ||
spec: | ||
serviceAccountName: "test-enterprise-values-minio" | ||
securityContext: | ||
runAsUser: 1000 | ||
runAsGroup: 1000 | ||
fsGroup: 1000 | ||
containers: | ||
- name: minio | ||
image: "minio/minio:RELEASE.2021-02-14T04-01-33Z" | ||
imagePullPolicy: IfNotPresent | ||
command: | ||
- "/bin/sh" | ||
- "-ce" | ||
- "/usr/bin/docker-entrypoint.sh minio -S /etc/minio/certs/ server /export" | ||
volumeMounts: | ||
- name: export | ||
mountPath: /export | ||
ports: | ||
- name: http | ||
containerPort: 9000 | ||
env: | ||
- name: MINIO_ACCESS_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: test-enterprise-values-minio | ||
key: accesskey | ||
- name: MINIO_SECRET_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: test-enterprise-values-minio | ||
key: secretkey | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 128Mi | ||
volumes: | ||
- name: export | ||
persistentVolumeClaim: | ||
claimName: test-enterprise-values-minio | ||
- name: minio-user | ||
secret: | ||
secretName: test-enterprise-values-minio |
47 changes: 47 additions & 0 deletions
47
...es-generated/mimir-distributed/charts/minio/templates/post-install-create-bucket-job.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
# Source: mimir-distributed/charts/minio/templates/post-install-create-bucket-job.yaml | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: test-enterprise-values-minio-make-bucket-job | ||
labels: | ||
app: minio-make-bucket-job | ||
chart: minio-8.0.10 | ||
release: test-enterprise-values | ||
heritage: Helm | ||
annotations: | ||
"helm.sh/hook": post-install,post-upgrade | ||
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: minio-job | ||
release: test-enterprise-values | ||
spec: | ||
restartPolicy: OnFailure | ||
volumes: | ||
- name: minio-configuration | ||
projected: | ||
sources: | ||
- configMap: | ||
name: test-enterprise-values-minio | ||
- secret: | ||
name: test-enterprise-values-minio | ||
serviceAccountName: "test-enterprise-values-minio" | ||
containers: | ||
- name: minio-mc | ||
image: "minio/mc:RELEASE.2021-02-14T04-28-06Z" | ||
imagePullPolicy: IfNotPresent | ||
command: ["/bin/sh", "/config/initialize"] | ||
env: | ||
- name: MINIO_ENDPOINT | ||
value: test-enterprise-values-minio | ||
- name: MINIO_PORT | ||
value: "9000" | ||
volumeMounts: | ||
- name: minio-configuration | ||
mountPath: /config | ||
resources: | ||
requests: | ||
memory: 128Mi |
37 changes: 37 additions & 0 deletions
37
...erated/mimir-distributed/charts/minio/templates/post-install-prometheus-metrics-role.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
# Source: mimir-distributed/charts/minio/templates/post-install-prometheus-metrics-role.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: test-enterprise-values-minio-update-prometheus-secret | ||
labels: | ||
app: minio-update-prometheus-secret | ||
chart: minio-8.0.10 | ||
release: test-enterprise-values | ||
heritage: Helm | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
verbs: | ||
- get | ||
- create | ||
- update | ||
- patch | ||
resourceNames: | ||
- test-enterprise-values-minio-prometheus | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
verbs: | ||
- create | ||
- apiGroups: | ||
- monitoring.coreos.com | ||
resources: | ||
- servicemonitors | ||
verbs: | ||
- get | ||
resourceNames: | ||
- test-enterprise-values-minio |
19 changes: 19 additions & 0 deletions
19
...mimir-distributed/charts/minio/templates/post-install-prometheus-metrics-rolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
# Source: mimir-distributed/charts/minio/templates/post-install-prometheus-metrics-rolebinding.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: test-enterprise-values-minio-update-prometheus-secret | ||
labels: | ||
app: minio-update-prometheus-secret | ||
chart: minio-8.0.10 | ||
release: test-enterprise-values | ||
heritage: Helm | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: test-enterprise-values-minio-update-prometheus-secret | ||
subjects: | ||
- kind: ServiceAccount | ||
name: test-enterprise-values-minio-update-prometheus-secret | ||
namespace: "default" |
11 changes: 11 additions & 0 deletions
11
...ir-distributed/charts/minio/templates/post-install-prometheus-metrics-serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# Source: mimir-distributed/charts/minio/templates/post-install-prometheus-metrics-serviceaccount.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: test-enterprise-values-minio-update-prometheus-secret | ||
labels: | ||
app: minio-update-prometheus-secret | ||
chart: minio-8.0.10 | ||
release: test-enterprise-values | ||
heritage: Helm |
17 changes: 17 additions & 0 deletions
17
.../tests/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
# Source: mimir-distributed/charts/minio/templates/pvc.yaml | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: test-enterprise-values-minio | ||
labels: | ||
app: minio | ||
chart: minio-8.0.10 | ||
release: test-enterprise-values | ||
heritage: Helm | ||
spec: | ||
accessModes: | ||
- "ReadWriteOnce" | ||
resources: | ||
requests: | ||
storage: "5Gi" |
15 changes: 15 additions & 0 deletions
15
...ts/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
# Source: mimir-distributed/charts/minio/templates/secrets.yaml | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: test-enterprise-values-minio | ||
labels: | ||
app: minio | ||
chart: minio-8.0.10 | ||
release: test-enterprise-values | ||
heritage: Helm | ||
type: Opaque | ||
data: | ||
accesskey: "Z3JhZmFuYS1taW1pcg==" | ||
secretkey: "c3VwZXJzZWNyZXQ=" |
21 changes: 21 additions & 0 deletions
21
...ts/test-enterprise-values-generated/mimir-distributed/charts/minio/templates/service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
# Source: mimir-distributed/charts/minio/templates/service.yaml | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: test-enterprise-values-minio | ||
labels: | ||
app: minio | ||
chart: minio-8.0.10 | ||
release: test-enterprise-values | ||
heritage: Helm | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- name: http | ||
port: 9000 | ||
protocol: TCP | ||
targetPort: 9000 | ||
selector: | ||
app: minio | ||
release: test-enterprise-values |
11 changes: 11 additions & 0 deletions
11
...-enterprise-values-generated/mimir-distributed/charts/minio/templates/serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# Source: mimir-distributed/charts/minio/templates/serviceaccount.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: "test-enterprise-values-minio" | ||
namespace: "default" | ||
labels: | ||
app: minio | ||
chart: minio-8.0.10 | ||
release: "test-enterprise-values" |
Oops, something went wrong.