Skip to content

Commit

Permalink
Fix code generation (minio#2181)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramondeklein authored Jun 24, 2024
1 parent 7452337 commit 6530c91
Show file tree
Hide file tree
Showing 37 changed files with 1,001 additions and 155 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ getdeps:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2 && \
echo "Installing govulncheck" && \
go install golang.org/x/vuln/cmd/govulncheck@latest &&\
echo "installng gopls" && \
echo "installing gopls" && \
go install golang.org/x/tools/gopls@latest

verify: getdeps govet lint
Expand Down
71 changes: 36 additions & 35 deletions config/manifests/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
namespace: minio-operator

resources:
- bases/minio-operator.clusterserviceversion.yaml
- bases/minio-operator-rhmp.clusterserviceversion.yaml
- ../../resources/
- ../../samples/
- bases/minio-operator.clusterserviceversion.yaml
- bases/minio-operator-rhmp.clusterserviceversion.yaml
- ../../resources/
- ../../samples/

patchesStrategicMerge:
- overlay/minio-operator-deployment.yaml
- overlay/console-deployment.yaml
- overlay/console_v1_service.yaml
- overlay/sts_v1_service.yaml

patches:
- target:
group: apps
version: v1
kind: Deployment
name: console
namespace: minio-operator
patch: |-
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsGroup
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsUser
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsNonRoot
- target:
group: apps
version: v1
kind: Deployment
name: minio-operator
namespace: minio-operator
patch: |-
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsGroup
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsUser
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsNonRoot
- patch: |-
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsGroup
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsUser
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsNonRoot
target:
group: apps
kind: Deployment
name: console
namespace: minio-operator
version: v1
- patch: |-
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsGroup
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsUser
- op: remove
path: /spec/template/spec/containers/0/securityContext/runAsNonRoot
target:
group: apps
kind: Deployment
name: minio-operator
namespace: minio-operator
version: v1
- path: overlay/minio-operator-deployment.yaml
- path: overlay/console-deployment.yaml
- path: overlay/console_v1_service.yaml
- path: overlay/sts_v1_service.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
24 changes: 24 additions & 0 deletions docs/job_crd.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,30 @@ Commands List of MinioClient commands
|*`mcImage`* __string__
|mc job image

|*`imagePullPolicy`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#pullpolicy-v1-core[$$PullPolicy$$]__
|*Optional* +


The pull policy for the MinIO Docker image. Specify one of the following: +


* `Always` +


* `Never` +


* `IfNotPresent` (Default) +


Refer Kubernetes documentation for details https://kubernetes.io/docs/concepts/containers/images#updating-images

|*`imagePullSecret`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#localobjectreference-v1-core[$$LocalObjectReference$$] array__
|*Optional* +


Specify the secret key to use for pulling images from a private Docker repository. +

|*`securityContext`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#podsecuritycontext-v1-core[$$PodSecurityContext$$]__
|*Optional* +

Expand Down
4 changes: 2 additions & 2 deletions docs/tenant-creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ namespace: minio-tenant
resources:
- github.com/minio/operator/examples/kustomization/base

patchesStrategicMerge:
- tenant.yaml
patches:
- path: tenant.yaml
```
and an overlay `tenant.yaml` like:
Expand Down
8 changes: 4 additions & 4 deletions examples/kustomization/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Kustomization
namespace: minio-tenant

resources:
- namespace.yaml
- tenant-config.yaml
- storage-user.yaml
- tenant.yaml
- namespace.yaml
- tenant-config.yaml
- storage-user.yaml
- tenant.yaml
2 changes: 1 addition & 1 deletion examples/kustomization/cert-manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- selfsigned-root-clusterissuer.yaml
- selfsigned-root-clusterissuer.yaml
14 changes: 7 additions & 7 deletions examples/kustomization/operator-certmanager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../cert-manager
- ../../../resources
- operator-ca-tls-secret.yaml
- sts-tls-certificate.yaml
- console-tls-certificate.yaml
- minio-operator-ca-issuer.yaml
- ../cert-manager
- ../../../resources
- operator-ca-tls-secret.yaml
- sts-tls-certificate.yaml
- console-tls-certificate.yaml
- minio-operator-ca-issuer.yaml

patches:
- path: operator-deployment.yaml
- path: operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../../resources
- console-tls-secret.yaml
- ../../../resources
- console-tls-secret.yaml

patchesStrategicMerge:
- console-deployment.yaml
patches:
- path: console-deployment.yaml
2 changes: 1 addition & 1 deletion examples/kustomization/sts-example/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- sts-app
- sts-app
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ kind: Kustomization
namespace: tenant-psp

resources:
- auditlog-sa.yaml
- prometheus-sa.yaml
- minio-sa.yaml
- ../base
- auditlog-sa.yaml
- prometheus-sa.yaml
- minio-sa.yaml
- ../base

patchesStrategicMerge:
- tenant.yaml
patches:
- path: tenant.yaml
13 changes: 6 additions & 7 deletions examples/kustomization/tenant-certmanager-kes/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ kind: Kustomization
namespace: tenant-certmanager-kes

resources:
- ../cert-manager
- myminio-kes-certificate.yaml
- vault.yaml
- ../tenant-kes-encryption

patchesStrategicMerge:
- tenant.yaml
- ../cert-manager
- myminio-kes-certificate.yaml
- vault.yaml
- ../tenant-kes-encryption

patches:
- path: tenant.yaml
10 changes: 5 additions & 5 deletions examples/kustomization/tenant-certmanager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ kind: Kustomization
namespace: tenant-certmanager

resources:
- tenant-certmanager-issuer.yaml
- tenant-certmanager-ca-certificate.yaml
- tenant-certmanager-myminio-certificate.yaml
- ../base
- tenant-certmanager-issuer.yaml
- tenant-certmanager-ca-certificate.yaml
- tenant-certmanager-myminio-certificate.yaml
- ../base

patches:
- path: tenant.yaml
- path: tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: Kustomization
namespace: tenant-external-idp-ldap

resources:
- ../base
- openldap.yaml
- ../base
- openldap.yaml

patchesStrategicMerge:
- tenant.yaml
- storage-user.yaml
patches:
- path: tenant.yaml
- path: storage-user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Kustomization
namespace: tenant-external-idp-oidc

resources:
- ../base
- ../base

patchesStrategicMerge:
- tenant.yaml
patches:
- path: tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ kind: Kustomization
namespace: tenant-kms-encrypted

resources:
- ../base
- kes-configuration-secret.yaml
- gcp-default-creds-secret.yaml
- kes-service-account.yaml
- ../base
- kes-configuration-secret.yaml
- gcp-default-creds-secret.yaml
- kes-service-account.yaml

patchesStrategicMerge:
- tenant.yaml
patches:
- path: tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: Kustomization
namespace: tenant-kms-encrypted

resources:
- ../base
- kes-configuration-secret.yaml
- ../base
- kes-configuration-secret.yaml

patchesStrategicMerge:
- tenant.yaml
patches:
- path: tenant.yaml
8 changes: 4 additions & 4 deletions examples/kustomization/tenant-letsencrypt/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: Kustomization
namespace: tenant-letsencrypt

resources:
- ingress.yaml
- ../base
- ingress.yaml
- ../base

patchesStrategicMerge:
- tenant.yaml
patches:
- path: tenant.yaml
6 changes: 3 additions & 3 deletions examples/kustomization/tenant-lite/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Kustomization
namespace: tenant-lite

resources:
- ../base
- ../base

patchesStrategicMerge:
- tenant.yaml
patches:
- path: tenant.yaml
4 changes: 2 additions & 2 deletions examples/kustomization/tenant-nodeport/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ kind: Kustomization
namespace: tenant-nodeport

resources:
- ../base
- nodeport-service.yaml
- ../base
- nodeport-service.yaml
4 changes: 2 additions & 2 deletions examples/kustomization/tenant-openshift/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ kind: Kustomization
namespace: minio-tenant

resources:
- ../base
- ../base
patches:
- path: tenant.yaml
- path: tenant.yaml
6 changes: 3 additions & 3 deletions examples/kustomization/tenant-tiny/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Kustomization
namespace: tenant-tiny

resources:
- ../base
- ../base

patchesStrategicMerge:
- tenant.yaml
patches:
- path: tenant.yaml
Loading

0 comments on commit 6530c91

Please sign in to comment.