Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions helm/tenant/templates/tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ spec:
{{- with (dig "env" (list) .) }}
env: {{- toYaml . | nindent 4 }}
{{- end }}
{{- with (dig "hostAliases" (list) .) }}
hostAliases: {{- toYaml . | nindent 4 }}
{{- end }}
{{- if dig "priorityClassName" "" . }}
priorityClassName: {{ dig "priorityClassName" "" . }}
{{- end }}
Expand Down
11 changes: 11 additions & 0 deletions helm/tenant/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,17 @@ tenant:
# Add environment variables to be set in MinIO container (https://github.com/minio/minio/tree/master/docs/config)
env: [ ]
###
# Add custom host aliases to MinIO pods.
#
# Example:
#
# .. code-block:: yaml
#
# - ip: "10.10.10.10"
# hostnames:
# - "internal.example.local"
hostAliases: [ ]
###
# PriorityClassName indicates the Pod priority and hence importance of a Pod relative to other Pods.
# This is applied to MinIO pods only.
# Refer Kubernetes documentation for details https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass/
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/minio.min.io/v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ type TenantSpec struct {
PriorityClassName string `json:"priorityClassName,omitempty"`
// *Optional* +
//
// Maps IP addresses to hostnames at the pod level. Entries are added to the `/etc/hosts` file on each MinIO pod.
// +optional
HostAliases []corev1.HostAlias `json:"hostAliases,omitempty"`
// *Optional* +
//
// The pull policy for the MinIO Docker image. Specify one of the following: +
//
// * `Always` +
Expand Down
7 changes: 7 additions & 0 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.

11 changes: 11 additions & 0 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.

1 change: 1 addition & 0 deletions pkg/resources/statefulsets/minio-statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ func NewPool(args *NewPoolArgs) *appsv1.StatefulSet {
SecurityContext: poolSecurityContext(pool, poolStatus),
ServiceAccountName: t.Spec.ServiceAccountName,
PriorityClassName: t.Spec.PriorityClassName,
HostAliases: t.Spec.HostAliases,
TerminationGracePeriodSeconds: pool.TerminationGracePeriodSeconds,
},
},
Expand Down
12 changes: 12 additions & 0 deletions resources/base/crds/minio.min.io_tenants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3778,6 +3778,18 @@ spec:
type: boolean
serviceAccountName:
type: string
hostAliases:
items:
properties:
hostnames:
items:
type: string
type: array
x-kubernetes-list-type: atomic
ip:
type: string
type: object
type: array
serviceMetadata:
properties:
consoleServiceAnnotations:
Expand Down