kube-thanos/minio.jsonnet
Max Gautier 55d4a7c28b
Do not depend on clusterDomain == cluster.local (#325)
* Do not depend on clusterDomain == cluster.local

While the default DNS domain of a Kubernetes cluster is 'cluster.local',
it can be changed.
Furthermore, container running in Kubernetes gets injected search
domains in their /etc/resolv.conf of the following form:

search <namespace>.svc.<cluster-domain> svc.<cluster-domain> <cluster-domain>

This means a good way to be agnostic regarding the cluster DNS domain is
to simply not specify it.

The downside is that the number of DNS queries might increase, because
the search domains are tried in order (which is why "<service>.<ns>" is better
than "<service>.<ns>.svc").

Signed-off-by: Max Gautier <mg@max.gautier.name>

* Apply 'make generate validate'

Signed-off-by: Max Gautier <mg@max.gautier.name>

---------

Signed-off-by: Max Gautier <mg@max.gautier.name>
2026-03-09 19:55:51 +05:30

33 lines
743 B
Jsonnet

local minio = (import 'jsonnet/minio/minio.libsonnet')({
namespace: 'thanos',
buckets: ['thanos'],
accessKey: 'minio',
secretKey: 'minio123',
});
{
'minio-deployment': minio.deployment,
'minio-pvc': minio.pvc,
'minio-service': minio.service,
'minio-secret-thanos': {
apiVersion: 'v1',
kind: 'Secret',
metadata: {
name: 'thanos-objectstorage',
namespace: minio.config.namespace,
},
stringData: {
'thanos.yaml': |||
type: s3
config:
bucket: thanos
endpoint: %s.%s:9000
insecure: true
access_key: minio
secret_key: minio123
||| % [minio.service.metadata.name, minio.config.namespace],
},
type: 'Opaque',
},
}