Skip to content

Commit

Permalink
never propagate labels/annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
ramondeklein committed Oct 15, 2024
1 parent 3d1425c commit f7b31a8
Show file tree
Hide file tree
Showing 12 changed files with 143 additions and 201 deletions.
62 changes: 31 additions & 31 deletions docs/tenant_crd.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,35 @@ Security Context
|===


[id="{anchor_prefix}-github-com-minio-operator-pkg-apis-minio-min-io-v2-poolsmetadata"]
==== PoolsMetadata

PoolsMetadata (`poolsMetadata`) defines custom labels and annotations for the MinIO pool stateful sets / pods. +

.Appears In:
****
- xref:{anchor_prefix}-github-com-minio-operator-pkg-apis-minio-min-io-v2-tenantspec[$$TenantSpec$$]
****

[cols="25a,75a", options="header"]
|===
| Field | Description

|*`labels`* __object (keys:string, values:string)__
|*Optional* +


If provided, append these labels to the MinIO statefulset / pods

|*`annotations`* __object (keys:string, values:string)__
|*Optional* +


If provided, append these annotations to the MinIO statefulset / pods

|===


[id="{anchor_prefix}-github-com-minio-operator-pkg-apis-minio-min-io-v2-servicemetadata"]
==== ServiceMetadata

Expand Down Expand Up @@ -777,35 +806,6 @@ sidecar's Resource, initcontainer will use that if set.
|===


[id="{anchor_prefix}-github-com-minio-operator-pkg-apis-minio-min-io-v2-statefulsetmetadata"]
==== StatefulSetMetadata

StatefulSetMetadata (`statefulSetMetadata`) defines custom labels and annotations for the MinIO stateful sets. +

.Appears In:
****
- xref:{anchor_prefix}-github-com-minio-operator-pkg-apis-minio-min-io-v2-tenantspec[$$TenantSpec$$]
****

[cols="25a,75a", options="header"]
|===
| Field | Description

|*`labels`* __object (keys:string, values:string)__
|*Optional* +


If provided, append these labels to the MinIO statefulset

|*`annotations`* __object (keys:string, values:string)__
|*Optional* +


If provided, append these annotations to the MinIO statefulset

|===


[id="{anchor_prefix}-github-com-minio-operator-pkg-apis-minio-min-io-v2-tenant"]
==== Tenant

Expand Down Expand Up @@ -1183,11 +1183,11 @@ Directs the Operator to expose the MinIO and/or Console services. +

Specify custom labels and annotations to append to the MinIO service and/or Console service.

|*`statefulSetMetadata`* __xref:{anchor_prefix}-github-com-minio-operator-pkg-apis-minio-min-io-v2-statefulsetmetadata[$$StatefulSetMetadata$$]__
|*`poolsMetadata`* __xref:{anchor_prefix}-github-com-minio-operator-pkg-apis-minio-min-io-v2-poolsmetadata[$$PoolsMetadata$$]__
|*Optional* +


Specify custom labels and annotations to append to the MinIO statefulsets.
Specify custom labels and annotations to append to all pool statefulsets and pods.

|*`users`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#localobjectreference-v1-core[$$LocalObjectReference$$] array__
|*Optional* +
Expand Down
22 changes: 11 additions & 11 deletions helm/operator/templates/minio.min.io_tenants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3638,6 +3638,17 @@ spec:
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
poolsMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
priorityClassName:
type: string
prometheusOperator:
Expand Down Expand Up @@ -5500,17 +5511,6 @@ spec:
format: int32
type: integer
type: object
statefulSetMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
subPath:
type: string
users:
Expand Down
14 changes: 0 additions & 14 deletions pkg/apis/minio.min.io/v2/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -878,20 +878,6 @@ func GetClusterDomain() string {
return k8sClusterDomain
}

// MergeMaps merges two maps and returns the union
func MergeMaps(a, b map[string]string) map[string]string {
if a == nil {
a = map[string]string{}
}
if b == nil {
b = map[string]string{}
}
for k, v := range b {
a[k] = v
}
return a
}

// ToMap converts a slice of env vars to a map of Name and value
func ToMap(envs []corev1.EnvVar) map[string]string {
newMap := make(map[string]string)
Expand Down
12 changes: 6 additions & 6 deletions pkg/apis/minio.min.io/v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ type TenantSpec struct {
ServiceMetadata *ServiceMetadata `json:"serviceMetadata,omitempty"`
// *Optional* +
//
// Specify custom labels and annotations to append to the MinIO statefulsets.
// Specify custom labels and annotations to append to all pool statefulsets and pods.
// +optional
StatefulSetMetadata *StatefulSetMetadata `json:"statefulSetMetadata,omitempty"`
PoolsMetadata *PoolsMetadata `json:"poolsMetadata,omitempty"`
// *Optional* +
//
// An array of https://kubernetes.io/docs/concepts/configuration/secret/[Kubernetes opaque secrets] to use for generating MinIO users during tenant provisioning. +
Expand Down Expand Up @@ -402,16 +402,16 @@ type ServiceMetadata struct {
ConsoleServiceAnnotations map[string]string `json:"consoleServiceAnnotations,omitempty"`
}

// StatefulSetMetadata (`statefulSetMetadata`) defines custom labels and annotations for the MinIO stateful sets. +
type StatefulSetMetadata struct {
// PoolsMetadata (`poolsMetadata`) defines custom labels and annotations for the MinIO pool stateful sets / pods. +
type PoolsMetadata struct {
// *Optional* +
//
// If provided, append these labels to the MinIO statefulset
// If provided, append these labels to the MinIO statefulset / pods
// +optional
Labels map[string]string `json:"labels,omitempty"`
// *Optional* +
//
// If provided, append these annotations to the MinIO statefulset
// If provided, append these annotations to the MinIO statefulset / pods
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}
Expand Down
66 changes: 33 additions & 33 deletions pkg/apis/minio.min.io/v2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pkg/client/applyconfiguration/minio.min.io/v2/tenantspec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/client/applyconfiguration/utils.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f7b31a8

Please sign in to comment.