Skip to main content
Version: v1.3.x

Prometheus-remote-write-auth

TypeComponent

Parameters​

Parameter
Type
Required
DefaultDescription
namestringYes

"prometheus-remote-write-auth"

Name of the Secret to create in the target namespace (default: prometheus-remote-write-auth)

namespacestringNo

Namespace where the Secret will be created (default: workload namespace)

Template​

The following tabs display the definition's Cue template and the rendered YAML. The rendered YAML is the output of the Cue template when the definition is applied to a cluster.

"prometheus-remote-write-auth": {
type: "component"
annotations: {}
labels: {
"componentdefinition.spectrocloud.com/type": "application"
"definition.spectrocloud.com/category": "Observability"
}
description: "Creates a Secret with Prometheus remote write credentials sourced from the OCM prometheus-agent addon Secret"
attributes: {
version: "1.0.0"
}
}

template: {
output: {
apiVersion: "v1"
kind: "Secret"
metadata: {
name: parameter.name
if parameter.namespace != _|_ {
namespace: parameter.namespace
}
if parameter.namespace == _|_ {
namespace: context.namespace
}
labels: {
"wl.spectrocloud.com/name": context.workloadName
"wl.spectrocloud.com/component": context.name
}
}
type: "Opaque"
data: {
if context.prometheusEndpoint != _|_ {
endpoint: context.prometheusEndpoint
}
if context.prometheusUsername != _|_ {
username: context.prometheusUsername
}
if context.prometheusPassword != _|_ {
password: context.prometheusPassword
}
}
}

parameter: {
// +usage=Name of the Secret to create in the target namespace (default: prometheus-remote-write-auth)
name: *"prometheus-remote-write-auth" | string

// +usage=Namespace where the Secret will be created (default: workload namespace)
namespace?: string
}
}