Skip to content

Commit

Permalink
split minio into own pkg & cleanup/update postgres/minio examples (#667)
Browse files Browse the repository at this point in the history
* split minio into own pkg & cleanup/update postgres/minio examples
* remove faulty minio backup from postgres operator
* rename zarf connect manifests
  • Loading branch information
jeff-mccoy authored Aug 23, 2022
1 parent 113d3b1 commit 9ad8b6e
Show file tree
Hide file tree
Showing 16 changed files with 142 additions and 180 deletions.
10 changes: 10 additions & 0 deletions examples/minio/operator-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
operator:
resources:
requests:
cpu: 200m
memory: 256Mi
ephemeral-storage: 500Mi
env:
# Disable TLS for this demo
- name: MINIO_OPERATOR_TLS_ENABLE
value: "off"
26 changes: 26 additions & 0 deletions examples/minio/tenant-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
tenant:
pools:
## Servers specifies the number of MinIO Tenant Pods / Servers in this pool.
## For standalone mode, supply 1. For distributed mode, supply 4 or more.
## Note that the operator does not support upgrading from standalone to distributed mode.
- servers: 1
## volumesPerServer specifies the number of volumes attached per MinIO Tenant Pod / Server.
volumesPerServer: 4
## size specifies the capacity per volume
size: 1Gi
## storageClass specifies the storage class name to be used for this pool
storageClassName: "###ZARF_STORAGE_CLASS###"
## Configure resource requests and limits for MinIO containers
resources:
requests:
cpu: "250m"
memory: "1Gi"
## LogSearch API setup for MinIO Tenant.
log:
## Postgres setup for LogSearch API
db:
volumeClaimTemplate:
spec:
storageClassName: "###ZARF_STORAGE_CLASS###"
prometheus:
storageClassName: "###ZARF_STORAGE_CLASS###"
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ metadata:
name: minio-console-zarf-connect
namespace: minio-operator
annotations:
zarf.dev/connect-description: "Launch the minio console"
zarf.dev/connect-description: "Launch the minio console, to get a JWT run:\n\n kubectl -n minio-operator get secrets console-sa-secret -o jsonpath=\"{.data.token}\" | base64 --decode\n"
labels:
zarf.dev/connect-name: minio
spec:
selector:
v1.min.io/tenant: zarf-minio-instance
app.kubernetes.io/instance: zarf-minio-operator-console
ports:
- name: http-console
port: 9090
Expand Down
38 changes: 38 additions & 0 deletions examples/minio/zarf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
kind: ZarfPackageConfig
metadata:
name: minio
description: "Deploy minio"
version: 4.3.7
url: https://operator.min.io/
image: https://raw.githubusercontent.com/minio/minio/master/.github/logo.svg?sanitize=true

components:
- name: minio
required: true
charts:
- name: operator
releaseName: minio-operator
url: https://operator.min.io/
version: 4.4.28
namespace: minio-operator
valuesFiles:
- operator-values.yaml
- name: tenant
releaseName: minio-tenant
url: https://operator.min.io/
version: 4.4.28
namespace: minio-operator
valuesFiles:
- tenant-values.yaml
manifests:
- name: zarf-connect
files:
- zarf-connect.yaml
images:
- minio/console:v0.19.4
- minio/operator:v4.4.28
- quay.io/minio/minio:RELEASE.2022-05-26T05-48-41Z
- library/postgres:13
- busybox:1.33.1
- alpine
- quay.io/prometheus/prometheus:latest
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,17 @@ spec:
teamId: "acid"
postgresql:
version: "13"
numberOfInstances: 3
enableConnectionPooler: true
numberOfInstances: 2
volume:
size: "2Gi"
users:
zarf: []
databases:
zarf: zarf
enableLogicalBackup: true
logicalBackupSchedule: "*/2 * * * *"
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 500m
memory: 500Mi
cpu: 1000m
memory: 1Gi
6 changes: 0 additions & 6 deletions examples/postgres-operator/manifests/patch-svc-accounts.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions examples/postgres-operator/manifests/postgres-operator.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ resources:
cpu: "500m"
memory: "512Mi"
env:
email: "[email protected]"
password: "###ZARF_GIT_AUTH_PUSH###"
email: "[email protected]"
password: "###ZARF_VAR_PGADMIN_PASSWORD###"
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ resources:
cpu: "100m"
memory: "100Mi"
limits:
cpu: "200m"
memory: "200Mi"
cpu: "500m"
memory: "500Mi"
envs:
# IMPORTANT: While operator chart and UI chart are idendependent, this is the interface between
# UI and operator API. Insert the service name of the operator API here!
Expand All @@ -14,19 +14,6 @@ envs:
targetNamespace: "postgres-operator"
teams:
- "acid"
extraEnvs:
- name: WALE_S3_ENDPOINT
value: "http+path://minio.minio-operator.svc.cluster.local:80"
- name: AWS_ENDPOINT
value: "http://minio.minio-operator.svc.cluster.local"
- name: SPILO_S3_BACKUP_PREFIX
value: "spilo/"
- name: AWS_ACCESS_KEY_ID
value: "minio"
- name: AWS_SECRET_ACCESS_KEY
value: "minio123"
- name: SPILO_S3_BACKUP_BUCKET
value: "postgres-operator-backups"
# We are defining our own Ingress manifest
ingress:
enabled: false
24 changes: 24 additions & 0 deletions examples/postgres-operator/postgres/operator-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
configPostgresPodResources:
default_cpu_request: "100m"
default_memory_request: "100Mi"
default_cpu_limit: "500m"
default_memory_limit: "500Mi"
min_cpu_limit: "250m"
min_memory_limit: "250Mi"
configConnectionPooler:
connection_pooler_default_cpu_request: "100m"
connection_pooler_default_cpu_limit: "1000m"
connection_pooler_default_memory_request: "100Mi"
connection_pooler_default_memory_limit: "500Mi"
resources:
requests:
cpu: "100m"
memory: "250Mi"
limits:
cpu: "1000m"
memory: "1Gi"
securityContext:
runAsUser: 1000
runAsNonRoot: true
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
39 changes: 0 additions & 39 deletions examples/postgres-operator/values/minio-instance.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions examples/postgres-operator/values/minio-operator.yaml

This file was deleted.

39 changes: 0 additions & 39 deletions examples/postgres-operator/values/postgres-operator.yaml

This file was deleted.

78 changes: 35 additions & 43 deletions examples/postgres-operator/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,55 @@ kind: ZarfPackageConfig
metadata:
name: postgres-operator-demo
description: "Demo of prod-like Postgres database(s) on an edge cluster"
# Big Bang / Iron Bank are only amd64
architecture: amd64

variables:
- name: PGADMIN_PASSWORD
prompt: true

components:
- name: baseline
- name: postgres-operator
required: true

manifests:
- name: postgres-example-config
files:
- manifests/patch-svc-accounts.yaml
- manifests/minio-instance-zarf-connect.yaml
- manifests/pgadmin-zarf-connect.yaml
- manifests/postgres-cluster.yaml
- manifests/postgres-operator.yaml
- manifests/postgres-operator-ui-zarf-connect.yaml
charts:
- name: postgres-operator
url: https://opensource.zalando.com/postgres-operator/charts/postgres-operator
version: 1.7.0
version: 1.8.2
namespace: postgres-operator
valuesFiles:
- values/postgres-operator.yaml
- postgres/operator-values.yaml
- name: postgres-operator-ui
url: https://opensource.zalando.com/postgres-operator/charts/postgres-operator-ui
version: 1.7.0
version: 1.8.2
namespace: postgres-operator
valuesFiles:
- values/postgres-operator-ui.yaml
- postgres/operator-ui-values.yaml
manifests:
- name: postgres-operator-zarf-connect
files:
- postgres/zarf-connect.yaml
images:
- registry.opensource.zalan.do/acid/postgres-operator-ui:v1.8.2
- registry.opensource.zalan.do/acid/postgres-operator:v1.8.2
- registry.opensource.zalan.do/acid/pgbouncer:master-22
- registry.opensource.zalan.do/acid/spilo-14:2.1-p6

- name: pgadmin
required: true
charts:
- name: pgadmin4
url: https://helm.runix.net
version: 1.7.2
version: 1.11.0
namespace: postgres-operator
valuesFiles:
- values/pgadmin.yaml
- name: minio-operator
url: https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio-operator.git
version: 4.2.3-bb.1
namespace: minio-operator
gitPath: chart
valuesFiles:
- values/minio-operator.yaml
- name: minio-instance
url: https://repo1.dso.mil/platform-one/big-bang/apps/application-utilities/minio.git
version: 4.2.3-bb.1
namespace: minio-operator
gitPath: chart
valuesFiles:
- values/minio-instance.yaml

- pgadmin/values.yaml
manifests:
- name: pgadmin-zarf-connect
files:
- pgadmin/zarf-connect.yaml
images:
- registry.opensource.zalan.do/acid/postgres-operator:v1.7.0
- registry.opensource.zalan.do/acid/spilo-13:2.1-p1
- registry.opensource.zalan.do/acid/logical-backup:v1.7.0
- registry.opensource.zalan.do/acid/pgbouncer:master-18
- registry.opensource.zalan.do/acid/postgres-operator-ui:v1.7.0
- docker.io/dpage/pgadmin4:5.5
- docker.io/rancher/pause:3.1
- registry1.dso.mil/ironbank/opensource/minio/operator:v4.2.3
- registry1.dso.mil/ironbank/opensource/minio/minio:RELEASE.2021-08-31T05-46-54Z
- docker.io/dpage/pgadmin4:6.10

- name: example-db
manifests:
- name: example-db
files:
- example-db/demo-cluster.yaml

0 comments on commit 9ad8b6e

Please sign in to comment.