Some checks failed
CI / build (push) Failing after 12s
GitOrigin-RevId: 6370f6ea785709295b6abcf9c60717cacf3ac432
140 lines
No EOL
5.2 KiB
Jsonnet
140 lines
No EOL
5.2 KiB
Jsonnet
local kube = import "k8s/configs/base.libsonnet";
|
|
|
|
local grafana = import "k8s/configs/templates/core/observability/grafana.libsonnet";
|
|
local kubeOpsView = import "k8s/configs/templates/core/observability/kube-ops-view.libsonnet";
|
|
local nginxIngress = import "k8s/configs/templates/core/network/nginx-ingress.libsonnet";
|
|
local prometheus = import "k8s/configs/templates/core/observability/prometheus.libsonnet";
|
|
local jaegerOperator = import "k8s/configs/templates/core/observability/jaeger-operator.libsonnet";
|
|
|
|
local namespace = "monitoring";
|
|
local ctx = kube.NewContext(kube.helm);
|
|
{
|
|
namespace: {
|
|
apiVersion: "v1",
|
|
kind: "Namespace",
|
|
metadata: {
|
|
name: namespace,
|
|
},
|
|
},
|
|
apps: {
|
|
jaegerInstance: {
|
|
apiVersion: "jaegertracing.io/v1",
|
|
kind: "Jaeger",
|
|
metadata: {
|
|
name: "my-jaeger",
|
|
},
|
|
spec: {
|
|
strategy: "allInOne",
|
|
storage: {
|
|
type: "badger",
|
|
options: {
|
|
badger: {
|
|
ephemeral: false,
|
|
"directory-key": "/badger/key",
|
|
"directory-value": "/badger/data",
|
|
},
|
|
},
|
|
},
|
|
allInOne: {
|
|
volumes: [
|
|
{
|
|
name: "data",
|
|
persistentVolumeClaim: {
|
|
claimName: "jaeger-pvc",
|
|
},
|
|
},
|
|
],
|
|
volumeMounts: [
|
|
{
|
|
name: "data",
|
|
mountPath: "/badger",
|
|
},
|
|
],
|
|
},
|
|
ingress: {
|
|
enabled: false,
|
|
ingressClassName: "nginx",
|
|
hosts: [
|
|
"jaeger.csbx.dev",
|
|
],
|
|
annotations: nginxIngress.KubeCsbxOauthProxyAnnotations + {
|
|
"cert-manager.io/cluster-issuer": "letsencrypt-production",
|
|
},
|
|
tls: [
|
|
{
|
|
secretName: "jaeger-ui-cert",
|
|
hosts: [
|
|
"jaeger.csbx.dev",
|
|
],
|
|
},
|
|
],
|
|
pathType: "Prefix",
|
|
},
|
|
},
|
|
},
|
|
jaegerOperator: jaegerOperator.App(jaegerOperator.Params {
|
|
namespace: namespace,
|
|
context: ctx,
|
|
}),
|
|
kubeOpsView: kubeOpsView.App(kubeOpsView.Params {
|
|
namespace: namespace,
|
|
name: "kube-ops-view",
|
|
filePath: std.thisFile,
|
|
clusterRoleName: "kube-ops-view",
|
|
hosts: [
|
|
"kube.csbx.dev",
|
|
],
|
|
ingressAnnotations: nginxIngress.KubeCsbxOauthProxyAnnotations,
|
|
}),
|
|
prometheus: prometheus.App(prometheus.Params {
|
|
context: ctx,
|
|
namespace: namespace,
|
|
existingClaim: "prometheus-server",
|
|
}),
|
|
grafana: grafana.App(grafana.Params {
|
|
context: ctx,
|
|
namespace: namespace,
|
|
hosts: [
|
|
"grafana.csbx.dev",
|
|
],
|
|
ingressAnnotations: nginxIngress.KubeCsbxOauthProxyAnnotations,
|
|
}),
|
|
ingress: nginxIngress.Ingress(nginxIngress.IngressParams {
|
|
namespace: namespace,
|
|
name: "grafana-ui",
|
|
hosts: [
|
|
"grafana.csbx.dev",
|
|
],
|
|
serviceName: "grafana",
|
|
annotations: nginxIngress.KubeCsbxOauthProxyAnnotations,
|
|
}),
|
|
jaegerIngress: nginxIngress.Ingress(nginxIngress.IngressParams {
|
|
namespace: namespace,
|
|
name: "jaeger-query",
|
|
hosts: [
|
|
"jaeger.csbx.dev",
|
|
],
|
|
serviceName: "my-jaeger-query",
|
|
servicePort: 16686,
|
|
annotations: nginxIngress.KubeCsbxOauthProxyAnnotations,
|
|
}),
|
|
},
|
|
volumes: {
|
|
jaeger: kube.RecoverableSimplePvc(namespace, "jaeger-pvc", "nfs-client", "10Gi", {
|
|
volumeName: "pvc-d04e51b8-0233-4c4c-a32b-680bb6dce1df",
|
|
nfsPath: "/volume3/fs/monitoring-jaeger-pvc-pvc-d04e51b8-0233-4c4c-a32b-680bb6dce1df",
|
|
nfsServer: "apollo1.dominion.lan",
|
|
}),
|
|
prometheus: kube.RecoverableSimplePvc(namespace, "prometheus-server", "nfs-client", "8Gi", {
|
|
volumeName: "pvc-59ac268a-8f51-11e9-b70e-b8aeed7dc356",
|
|
nfsPath: "/volume3/fs/monitoring-prometheus-server-pvc-59ac268a-8f51-11e9-b70e-b8aeed7dc356",
|
|
nfsServer: "apollo1.dominion.lan",
|
|
}),
|
|
grafana: kube.RecoverableSimplePvc(namespace, "grafana", "nfs-client", "10Gi", {
|
|
volumeName: "pvc-632e71f0-54e1-45b3-b63a-5dd083b5e77f",
|
|
nfsPath: "/volume3/fs/monitoring-grafana-pvc-632e71f0-54e1-45b3-b63a-5dd083b5e77f",
|
|
nfsServer: "apollo1.dominion.lan",
|
|
}),
|
|
},
|
|
secrets: {},
|
|
} |