https://pulumi.com logo
#general
Title
# general
w

worried-city-86458

09/27/2019, 4:57 AM
Re prometheus operator above, nearly there:
Copy code
const monitoringNamespace = new k8s.core.v1.Namespace("monitoring", { metadata: { name: "monitoring" } }, { provider : provider });

function setMonitoringNamespace(obj: any) {
    if (obj.metadata.namespace === undefined) {
        obj.metadata.namespace = "monitoring";
    }
}

const prometheusOperatorChart = new k8s.helm.v2.Chart("po", {
    repo: "stable",
    chart: "prometheus-operator",
    namespace: "monitoring",
    transformations: [ setMonitoringNamespace ],
    values: {
        kubeControllerManager: { enabled: false },
        kubeEtcd: { enabled: false },
        kubeScheduler: { enabled: false },
        kubeTargetVersionOverride: k8sVersion,
        prometheusOperator: { createCustomResource: false }
    }
}, {
    dependsOn: monitoringNamespace,
    provider: provider
});