This is the multi-page printable view of this section. Click here to print.
Greenhouse documentation
- 1: Getting started
- 1.1: Core Concepts
- 1.1.1: Organizations
- 1.1.2: Teams
- 1.1.3: Clusters
- 1.1.4: PluginDefinitions, Plugins and PluginPresets
- 1.2: Overview
- 1.3: Installation
- 1.4: Operational Processes
- 1.5: Ownership
- 2: User guides
- 2.1: Organization management
- 2.1.1: Creating an organization
- 2.2: Cluster management
- 2.2.1: Cluster onboarding
- 2.2.2: Remote Cluster Connectivity with OIDC
- 2.2.3: Cluster offboarding
- 2.3: Plugin management
- 2.3.1: Testing a Plugin
- 2.3.2: Plugin deployment
- 2.3.3: Managing Plugins for multiple clusters
- 2.3.4: Plugin Catalog
- 2.4: Team management
- 3: Architecture
- 4: Reference
- 4.1: API
- 4.2: Greenhouse API
- 4.2.1: Organizations
- 4.2.2: PluginDefinitions
- 4.2.3: PluginPresets
- 4.2.4: Plugins
- 4.2.5: Catalogs
- 4.3: Plugin Catalog
- 4.3.1:
- 4.3.2: Alerts
- 4.3.3: Audit Logs Plugin
- 4.3.4: Cert-manager
- 4.3.5: Decentralized Observer of Policies (Violations)
- 4.3.6: Designate Ingress CNAME operator (DISCO)
- 4.3.7: DigiCert issuer
- 4.3.8: External DNS
- 4.3.9: Ingress NGINX
- 4.3.10: Kubernetes Monitoring
- 4.3.11: Logs Plugin
- 4.3.12: Logshipper
- 4.3.13: OpenSearch
- 4.3.14: Perses
- 4.3.15: Plutono
- 4.3.16: Prometheus
- 4.3.17: Reloader
- 4.3.18: Repo Guard
- 4.3.19: Service exposure test
- 4.3.20: Thanos
- 5: Contribute
- 6:
- 7:
1 - Getting started
1.1 - Core Concepts
| Feature | Description | API | UI | Comments |
|---|---|---|---|---|
| Organizations | Organizations are the top-level entities in Greenhouse. | 🟢 | 🟢 | |
| Teams | Teams are used to manage access and ownership of resources in Greenhouse. | 🟢 | 🟡 | Read-only access to Teams via the UI |
| Clusters | Clusters represent a Kubernetes cluster that is managed by Greenhouse. | 🟡 | 🟡 | Limited modification of Clusters via UI, CLI for KubeConfig registry planned. |
| Plugin Definitions & Plugins | Plugins are software components that extend and integrate with Greenhouse . | 🟡 | 🟡 | Read-only access via UI, a native Plugin Catalog is planned. |
1.1.1 - Organizations
What are Organizations?
Organizations are the top-level entities in Greenhouse. Each Organization gets a dedicated Namespace, that contains all resources bound to the Organization. Greenhouse expects an Organization to provide its own Identity Provider and currently supports OIDC Identity Providers. Greenhouse also supports SCIM for syncing users and groups from an Identity Provider.
See Creating an Organization for more details.
Organization Namespace and Permissions
The Organization’s Namespace in the Greenhouse cluster contains all resources bound to the Organization. This Namespace is automatically provisioned when a new Organization is created and shares the Organization’s name. Once the Namespace is created, Greenhouse will automatically seed RBAC Roles and ClusterRoles for the Organization. These are used to grant permissions for the Organization’s resources to Teams.
- The Administrators of an Organization are specified via a identity provider (IDP) group during the creation of the Organization. Greenhouse automatically creates a Team called
<org-name>-admin. This Team is also a support group and all alerts created by the Greenhouse controller are routed to this admin Team, if no other ownership is provided. See operational processes and ownership for details. - The Administrators for Plugins and Clusters need to be defined by the Organization Admins via
RoleBindingsfor the seeded Rolesrole:<org-name>:cluster-adminandrole:<org-name>:plugin-admin. - All authenticated users are considered members of the Organization and are granted the
organization:<org-name>Role.
See Working with Organizations for details on the seeded Roles and ClusterRoles.
OIDC
Each Organization must specify the OIDC configuration for the Organization’s IDP. This configuration is used together with DEXIDP to authenticate users in the Organization.
SCIM
Each Organization can specify SCIM credentials which are used to syncronize users and groups from an Identity Provider. This makes it possible to view the members of a Team in the Greenhouse dashboard.
Next Steps
1.1.2 - Teams
What are Teams?
Teams in a Greenhouse Organization are used to group users by group claims on the token provided by the upstream identity provider (IdP).
This can be used, for example, for
- organizational management
- access and permission management
- identifying
Ownershipof resources
The Greenhouse UI is showing the members of a Team.
Team RBAC
TeamRoles and TeamRoleBindings provide a mechanism to control the permissions of Teams to onboarded Clusters of an Organization.
Team role-based access control (RBAC) wraps the concept of Kubernetes RBAC in TeamRoles and TeamRoleBindings . TeamRoles are used to define a set of RBAC permissions. These permissions can be granted to Teams with TeamRoleBindings . A TeamRoleBinding refers to a Team, a TeamRole , Cluster(s) and optional Namespaces. Depending on the latter, Greenhouse will create the appropriate rbacv1 resources on the targeted cluster(s) in either Cluster or Namespace scope.
More information about how this can be configured is mentioned in this user guide.
Example of a TeamRoleBinding for a observability-admin which grants the cluster-admin TeamRole on the observability Cluster in the logs and metrics Namespaces. The TeamRoleBinding contains a list of Namespaces and a ClusterSelector to select the cluster(s) to target. Setting the .spec.namespaces field decides whether the created RBAC resources will be namespace-scoped or cluster-scoped.
apiVersion: greenhouse.sap/v1alpha2
kind: TeamRoleBinding
metadata:
name: observability-admin
spec:
teamRef: observability
roleRef: cluster-admin
clusterSelector:
clusterName: observability
namespaces:
- logs
- metrics
Support Groups
Support Groups in Greenhouse are a subset of Teams in an Organization. These Teams are used to identify response groups for operational tasks and to prefilter UI content.
Since a user can be part of many Teams the expectation is that they are only part of one Support Group.
To identify a Team as a Support Group in Greenhouse it needs to be labeled with greenhouse.sap/support-group: "true".
1.1.3 - Clusters
What are Clusters?
In the context of Greenhouse a Cluster represents a Kubernetes cluster that is onboarded to Greenhouse. Onboarded in this context means that Greenhouse can handle the management of role-based access control (RBAC) and the provisioning of operating tools (e.g. logging, monitoring, ingress etc.). The Greenhouse dashboard provides an overview of all onboarded clusters. Throughout Greenhouse the reference to a Cluster is used to target it for configuration and deployments.
Cluster access
During the initial onboarding of a cluster, Greenhouse will create a dedicated ServiceAccount inside the onboarded cluster. This ServiceAccount’s token is rotated automatically by Greenhouse.
Cluster registry (coming soon)
Once a Cluster is onboarded to Greenhouse a ClusterKubeConfig is generated for the Cluster based on the OIDC configuration of the Organization. This enables members of an Organization to access the fleet of onboarded Clusters via the common Identity Provider. on the respective Clusters can be managed via Greenhouse Team RBAC.
In order to make it convenient to use these ClusterKubeConfigs and to easily switch between multiple context locally there will be a CLI provided by Greenhouse.
1.1.4 - PluginDefinitions, Plugins and PluginPresets
What are PluginDefinitions and Plugins?
PluginDefinitons and Plugins are the Greenhouse way to extend the core functionality with domain specific features. PluginDefinitions, as the name suggests, are the definition of a Plugin, whereas a Plugin is a concrete instance of a PluginDefinition that is deployed to a Cluster.
The PluginDefinitions are shared between all Organizations in Greenhouse. A PluginDefinition can include a frontend, that is displayed in the Greenhouse dashboard and/or a backend component. The frontend is expected to be a standalone microfrontend created with the Juno framework. The backend components of a PluginDefinition are packaged as a Helm Chart and provide sane and opinionated default values. This allows Greenhouse to package and distribute tools such as Prometheus with a sensible default configuration, as well as giving the user a list of configurable values.
A Plugin is used to deploy the Helm Chart referenced in a PluginDefinition to a Cluster. The Plugin can be considered as an instance of a PluginDefinition, this instance specifies the PluginDefinition, the desired Cluster and additional values to set. Depending on the PluginDefinition, it may be necessary to specify required values (e.g. credentials, endpoints, etc.), but in general the PluginDefinition provides well-established default values.
[!NOTE] In this example the Plugin ‘openTelemetry-cluster-a’ is used to deploy the PluginDefinition ‘openTelemetry’ to the cluster ‘cluster-a’.
PluginPresets
PluginPresets are a mechanism to configure Plugins for multiple clusters at once. They are used to define a common configuration for a PluginDefinition that can be applied to multiple clusters, while allowing to override the configuration for individual clusters.
[!NOTE] In this example the PluginPreset ’example-obs’ references the PluginDefinition ’example’ and contains a clusterSelector that matches the clusters ‘cluster-a’ and ‘cluster-b’. The PluginPreset creates two Plugins ’example-obs-cluster-a’ and ’example-obs-cluster-b’ for the respective clusters.
Next Steps
1.2 - Overview
What is Greenhouse?
Greenhouse is a cloud operations platform designed to streamline and simplify the management of a large-scale, distributed infrastructure.
It offers a unified interface for organizations to manage various operational aspects efficiently and transparently and operate their cloud infrastructure in compliance with industry standards.
The platform addresses common challenges such as the fragmentation of tools, visibility of application-specific permission concepts and the management of organizational groups.
It also emphasizes the harmonization and standardization of authorization concepts to enhance security and scalability.
With its operator-friendly dashboard, features and extensive automation capabilities, Greenhouse empowers organizations to optimize their cloud operations, reduce manual efforts, and achieve greater operational efficiency.
Value Propositions
- Holistic dashboard Unified dashboard for infrastructure, alert, security, compliance, and organizational management. (Juno)
- Organization management Greenhouse allows to manage organizational groups as Teams. Teams can be provided with fine-grained access control to resources and tools. (e.g. Github Repositories, Kubernetes RBAC, etc.)
- Automation Greenhouse allows to configure tools and access control in a declarative way, that is auto-deployed across a fleet of Kubernetes clusters.
- Security & Compliance With Heureka, Greenhouse integrates a Security Posture Management tool that focuses on remediation of security issues (vulnerabilities, security events, policy violations), while ensuring compliance and auditability.
- Extensibility Greenhouse provides a plugin system that provides a curated catalog of plugins with sane defaults. Furthermore, it is possible to extend the platform with self-developed plugins.
Roadmap
The Roadmap Kanban board provides an overview of ongoing and planned efforts.
Architecture & Design
The Greenhouse design and architecture document describes the various use-cases and user stories.
1.3 - Installation
This section provides a step-by-step guide to install Greenhouse on a Gardner shoot cluster.
Prerequisites
Before you start the installation, make sure you have the following prerequisites:
- Helm & Kubernetes CLI
- OAuth2/OpenID provider (see Authentik)
- Gardener Shoot Cluster configured to use the OIDC provider
- nginx-ingress deployed in the cluster
Installation
To install Greenhouse on your Gardener shoot cluster, follow these steps:
Create a values file called
values.yamlwith the following content:global: dnsDomain: tld.domain # Shoot.spec.dns.domain kubeAPISubDomain: myapi # api is already used by Gardener oidc: enabled: true issuer: <issuer-url> clientID: <client-ID> clientSecret: <top-secret> organization: enabled: false # disable, because the greenhouse webhook is not running yet teams: admin: mappedIdPGroup: greenhouse-admins # gardener specifics dashboard: ingress: annotations: dns.gardener.cloud/dnsnames: "*" dns.gardener.cloud/ttl: "600" dns.gardener.cloud/class: garden cert.gardener.cloud/purpose: managed idproxy: enabled: false # disable because no organization is created yet ingress: annotations: dns.gardener.cloud/dnsnames: "*" dns.gardener.cloud/ttl: "600" dns.gardener.cloud/class: garden cert.gardener.cloud/purpose: managed cors-proxy: ingress: annotations: dns.gardener.cloud/dnsnames: "*" dns.gardener.cloud/ttl: "600" dns.gardener.cloud/class: garden cert.gardener.cloud/purpose: managed # disable Plugins for the greenhouse organization, PluginDefinitions are missing plugins: enabled: false # disable, Prometheus CRDs are missing manager: alerts: enabled: falseInstall the Greenhouse Helm chart:
helm install greenhouse oci://ghcr.io/cloudoperators/greenhouse/charts/greenhouse --version <greenhouse-release-version> -f values.yamlEnable Greenhouse OIDC
Now set
organization.enabledandidproxy.enabledtotruein thevalues.yamlfile and upgrade the Helm release:helm upgrade greenhouse oci://ghcr.io/cloudoperators/greenhouse/charts/greenhouse --version <greenhouse-release-version> -f values.yamlThis will create the initial Greenhouse Organization and the Greenhouse Admin Team. This Organization will receive the
greenhousenamespace, which is used to manage the Greenhouse installation and allows to administer other organizations. Enabling the idproxy will deploy the idproxy service which handles the OIDC authentication.
1.4 - Operational Processes
Operational Processes in Greenhouse
Greenhouse provides a couple of predefined operational processes.
Operational processes facilitated via Greenhouse heavily rely on the Ownership principle. It is used to route operational tasks to Support Groups.
Examples for these operational tasks are:
- Alert routing based on metrics
- Lifecycle management of k8s Clusters
- Security posture and vulnerability patch management
- Secret rotation and management
Labels Used
Greenhouse focuses on labels in three different places:
- On resources (e.g. PluginPresets, Clusters but also k8s Deployments, Pods, etc.)
- On metrics exposed by those resources
- On Prometheus alerts based on metrics
The following labels are used by Greenhouse automation:
| label | description | used on | used by |
|---|---|---|---|
greenhouse.sap/owned-by | Identifies the owning team of a resource | Resources, metrics | Security management, lifecycle management, secret rotation |
support_group | Specifies the support group responsible for the alert | Alerts | Alert routing |
service | Groups resources belonging to a service | Resources, metrics, alerts | Security management, alert routing |
region | Indicates the region an alert is firing in | Metrics, alerts | Alert routing |
severity | Indicates the importance or urgency of an alert | Alerts | Alert routing |
| Cluster | Specifies the cluster a metric is exposed on | Metrics, alerts | Alert routing |
Alert Routing
Monitoring and alert routing is achieved through a combination of Plugins running on the remote Clusters and the Greenhouse central cluster.
All alerts processed with Greenhouse need the support_group label that can be extracted from the greenhouse.sap/owned-by.
With the Alerts Plugin a holistic alerts dashboard is integrated to the Greenhouse UI. This dashboard is prefiltered on the support group a user is member of. It directly displays alerts by region and severity. Also service is prominently displayed.
It is good practice to also route alerts by support_group and/or severity to specific Alertmanager receivers (e.g. Slack channels).
Lifecycle management of k8s Clusters
All Cluster related alerts, including version expiration and other maintenance tasks are routed to the owning support_group of the Cluster.
Security Management
Security posture and vulnerability management is achieved through the heureka Plugin. It scans for security violations in running k8s containers and displays these by support_group and service.
Secret Management
With secret management Greenhouse wants to have alerts on expiring Secrets in need of rotation. These alerts will be routed to the respective support_groups. See roadmap item for further information.
1.5 - Ownership
What is Ownership within Greenhouse
Ownership in Greenhouse is the combination of two of the core features:
- User and Organization management via Teams
- Deployment of resources (Plugins, TeamRoleBindings) to remote Clusters
Greenhouse provides a 1:1 relationship between a Team and
- PluginPresets
- Plugins
- Clusters
- TeamRoleBindings
- Secrets
Within the context of Greenhouse this relationship is called Ownership.
Why Ownership of Resources
Operational processes facilitated via Greenhouse rely on Ownership:
By identifying the owner of a resource it is possible to route operational tasks on the resource to the owner.
How is Ownership achieved
Greenhouse expects a label with the key greenhouse.sap/owned-by with a value matching an existing Team on the following resources in the Greenhouse central cluster:
- PluginPresets
- Plugins
- Clusters
- TeamRoleBindings
- Secrets
Missing
greenhouse.sap/owned-bylabel results in aStatusConditioncalledOwnerLabelSetConditionset tofalse. Agreenhouse_owned_by_label_missingmetric on missing owner labels is exposed and alerted on.
The owner label is also expected on k8s resources (e.g. Deployments, Pods, …) exposing metrics on the remote clusters.
Label Transport
On Greenhouse central cluster
The Greenhouse controller transports labels from a source resource to a target resource on the Greenhouse cluster. This is currently active for:
- Secrets that are used to bootstrap a Cluster
- PluginPresets creating Plugins
The transport works via metadata.annotation on the source:
metadata:
...
labels:
foo: bar
qux: baz
greenhouse.sap/owned_by: foo-team
...
annotations:
greenhouse.sap/propagate-labels: "foo, greenhouse.sap/owned_by"
...
which results in metadata.labels and a state in metadata.annotations added to the target:
metadata:
annotations:
...
greenhouse.sap/last-applied-propagator: '{"labelKeys":["foo","greenhouse.sap/owned_by"]}'
labels:
foo: bar
greenhouse.sap/owned_by: foo-team
...
On Resources on Remote Clusters
Greenhouse will provide the automation to label all resources created by a Plugin on the remote Cluster in the future: https://github.com/cloudoperators/greenhouse-extensions/issues/704
Currently Greenhouse provides the owned-by label as a OptionValue to be consumed by the underlying helm chart of the Plugin.
2 - User guides
2.1 - Organization management
This section provides guides for the management your organization in Greenhouse.
2.1.1 - Creating an organization
Before you begin
This guides describes how to create an organization in Greenhouse.
Creating an organization
An organization within the Greenhouse cloud operations platform is a separate unit with its own configuration, teams, and resources tailored to their requirements. These organizations can represent different teams, departments, or projects within an enterprise, and they operate independently within the Greenhouse platform. They allow for the isolation and management of resources and configurations specific to their needs. Since each Organization will receive its own Kubernetes Namespace within the Greenhouse cluster.
While Greenhouse is build on the idea of a self-service API and automation driven platform, the workflow to onboard an organization to Greenhouse involves reaching out to the Greenhouse administrators. This ensures all pre-requisites are met, the organization is configured correctly and the administrators of the Organization understand the platform capabilities.
| ❗ Please note that the name of an organization is immutable. |
|---|
Steps
IdP Group An IdP Group is required to configure the administrators of the organization. Onboarding without an Group is not possible, as this would leave the organization without any administrators having access. Please include the name of the IdP Group in the message to the Greenhouse team when signing up.
Identity Provider
The authentication for the users belonging to your organization is based on the OpenID Connect (OIDC) standard.
Please include the parameters for your OIDC provider in the message to the Greenhouse team when signing up.Greenhouse organization
A Greenhouse administrator applies the following configuration to the central Greenhouse cluster.
Bear in mind that the name of the organization is immutable and will be part of all URLs.apiVersion: v1 kind: Namespace metadata: name: my-organization --- apiVersion: v1 kind: Secret metadata: name: oidc-config namespace: my-organization type: Opaque data: clientID: ... clientSecret: ... --- apiVersion: greenhouse.sap/v1alpha1 kind: Organization metadata: name: my-organization spec: authentication: oidc: clientIDReference: key: clientID name: oidc-config clientSecretReference: key: clientSecret name: oidc-config issuer: https://... scim: baseURL: URL to the SCIM server. basicAuthUser: secret: name: Name of the secret in the same namespace. key: Key in the secret holding the user value. basicAuthPw: secret: name: Name of the secret in the same namespace. key: Key in the secret holding the password value. description: My new organization displayName: Short name of the organization mappedOrgAdminIdPGroup: Name of the group in the IDP that should be mapped to the organization admin role.
Setting up Team members synchronization with Greenhouse
Team members synchronization with Greenhouse requires access to SCIM API.
For the members to be reflected in a Team’s status, the created Organization needs to be configured with URL and credentials of the SCIM API. SCIM API is used to get members for teams in the organization based on the IDP groups set for teams.
IDP group for the organization admin team must be set to the mappedOrgAdminIdPGroup field in the Organization configuration. It is required for the synchronization to work. IDP groups for remaining teams in the organization should be set in their respective configurations - Team’s mappedIdpGroup field.
Next Steps
2.2 - Cluster management
Greenhouse enables organizations to register their Kubernetes clusters within the platform, providing a centralized interface for managing and monitoring these clusters.
Once registered, users can perform tasks related to cluster management, such as deploying applications, scaling resources, and configuring access control, all within the Greenhouse platform.
This section provides guides for the management of Kubernetes clusters within Greenhouse.
2.2.1 - Cluster onboarding
Content Overview
This guides describes how to onboard an existing Kubernetes cluster to your Greenhouse organization.
If you don’t have an organization yet please reach out to the Greenhouse administrators.
While all members of an organization can see existing clusters, their management requires org-admin or
cluster-admin privileges. See RBAC within the Organization namespace for details.
:information_source: The UI is currently in development. For now this guide describes the onboarding workflow via command line.
Preparation
Download the latest greenhousectl binary from the Greenhouse releases.
Onboarding a Cluster to Greenhouse will require you to authenticate to two different Kubernetes clusters via respective kubeconfig files:
greenhouse: The cluster your Greenhouse installation is running on. You needorganization-adminorcluster-adminprivileges.bootstrap: The cluster you want to onboard. You needsystem:mastersprivileges.
For consistency, we will refer to those two clusters by their names from now on.
You need to have the kubeconfig files for both the greenhouse and the bootstrap cluster at hand. The kubeconfig file for the greenhouse cluster can be downloaded via the Greenhouse dashboard:
Organization > Clusters > Access Greenhouse cluster.
Onboard
For accessing the bootstrap cluster, the greenhousectl will expect your default Kubernetes kubeconfig file and context to be set to bootstrap. This can be achieved by passing the --kubeconfig flag or by setting the KUBECONFIG env var.
The location of the kubeconfig file to the greenhouse cluster is passed via the --greenhouse-kubeconfig flag.
greenhousectl cluster bootstrap --kubeconfig=<path/to/bootstrap-kubeconfig-file> --greenhouse-kubeconfig <path/to/greenhouse-kubeconfig-file> --org <greenhouse-organization-name> --cluster-name <name>
Since Greenhouse generates URLs which contain the cluster name, we highly recommend to choose a short cluster name.
In particular for Gardener Clusters setting a short name is mandatory, because Gardener has very long cluster names, e.g. garden-greenhouse--monitoring-external.
A typical output when you run the command looks like
2024-02-01T09:34:55.522+0100 INFO setup Loaded kubeconfig {"context": "default", "host": "https://api.greenhouse.tld"}
2024-02-01T09:34:55.523+0100 INFO setup Loaded client kubeconfig {"host": "https://api.remote.tld"}
2024-02-01T09:34:56.579+0100 INFO setup Bootstraping cluster {"clusterName": "monitoring", "orgName": "ccloud"}
2024-02-01T09:34:56.639+0100 INFO setup created namespace {"name": "ccloud"}
2024-02-01T09:34:56.696+0100 INFO setup created serviceAccount {"name": "greenhouse"}
2024-02-01T09:34:56.810+0100 INFO setup created clusterRoleBinding {"name": "greenhouse"}
2024-02-01T09:34:57.189+0100 INFO setup created clusterSecret {"name": "monitoring"}
2024-02-01T09:34:58.309+0100 INFO setup Bootstraping cluster finished {"clusterName": "monitoring", "orgName": "ccloud"}
After onboarding
- List all clusters in your Greenhouse organization:
kubectl --namespace=<greenhouse-organization-name> get clusters
- Show the details of a cluster:
kubectl --namespace=<greenhouse-organization-name> get cluster <name> -o yaml
Example:
apiVersion: greenhouse.sap/v1alpha1
kind: Cluster
metadata:
creationTimestamp: "2024-02-07T10:23:23Z"
finalizers:
- greenhouse.sap/cleanup
generation: 1
name: monitoring
namespace: ccloud
resourceVersion: "282792586"
uid: 0db6e464-ec36-459e-8a05-4ad668b57f42
spec:
accessMode: direct
maxTokenValidity: 72h
status:
bearerTokenExpirationTimestamp: "2024-02-09T06:28:57Z"
kubernetesVersion: v1.27.8
statusConditions:
conditions:
- lastTransitionTime: "2024-02-09T06:28:57Z"
status: "True"
type: Ready
When the status.kubernetesVersion field shows the correct version of the Kubernetes cluster, the cluster was successfully bootstrapped in Greenhouse.
Then status.conditions will contain a Condition with type=Ready and status="true""
In the remote cluster, a new namespace is created and contains some resources managed by Greenhouse. The namespace has the same name as your organization in Greenhouse.
Troubleshooting
If bootstrapping fails, you can inspect the Cluster.statusConditions for more details. The type=KubeConfigValid condition may contain hints in the message field. Additional insights can be found in the type=PermissionsVerified and type=ManagedResourcesDeployed conditions, which indicate whether ServiceAccount has valid permissions and whether required resources were successfully deployed. These conditions are also visible in the UI on the Cluster details view.
Reruning the onboarding command with an updated kubeConfig file will fix these issues.
2.2.2 - Remote Cluster Connectivity with OIDC
Content Overview
This guide describes how to onboard an existing Kubernetes cluster to your Greenhouse Organization with OIDC configuration. If you don’t have a Greenhouse Organization yet, please reach out to the Greenhouse administrators.
While all members of an Organization can see existing Clusters, their management requires org-admin or
cluster-admin privileges. See RBAC with the Organization namespace for details.
:information_source: The UI is currently in development. For now this guide describes the onboarding workflow via command line.
OIDC Overview
Starting from Kubernetes v1.21, the feature Service Account Issuer Discovery transforms the Kubernetes API server into an OIDC identity provider. This setup facilitates the issuance of tokens, via service accounts to pods, which are recognizable by external services outside the Kubernetes cluster, thereby establishing an authentication pathway between the pod within the cluster and external services including those on Azure, AWS, etc.
Starting from Kubernetes v1.30, Structured Authentication Configuration moved to beta and the feature gate is enabled by default. This feature allows configuring multiple OIDC issuers and passing them as a configuration file to the Kubernetes API server.
More information on Structured Authentication Configuration can be found at https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration
With the combination of Service Account Issuer Discovery and Structured Authentication Configuration, Cluster to Cluster trust can be established.
A remote cluster can add the Greenhouse cluster’s Service Account Issuer as an
OIDC issuer in its Structured Authentication Configuration. This allows the Greenhouse cluster to authenticate
against said remote cluster, using an in-cluster service account token.
The OIDC Remote Cluster Connectivity is illustrated below -
(Pattern: `prefix:system:serviceaccount:org-name:cluster-name`) User->>AC: Applies Kubernetes Secret with OIDC parameters
(Namespace: Organization's Namespace) AC-->>AC: `Bootstrap controller creates ServiceAccount
(Sets OIDC Secret as owner on SA)` AC-->>AC: Bootstrap controller requests Token from ServiceAccount AC-->>AC: Bootstrap controller writes/updates KubeConfig in OIDC Secret
(Key: greenhouseKubeconfig) AC-->>AC: Bootstrap controller creates Cluster CR
(Sets Cluster as owner on OIDC Secret) AC-->>AC: Cluster controller fetches KubeConfig from Secret AC->>RC: Cluster controller requests Kubernetes Version & Node Status RC-->>AC: 🔍 Introspects Incoming Token
(Introspection towards Admin-Cluster Service Account Issuer URL) RC-->>RC: 🔒 Verifies Authorization via RBAC RC->>AC: ✅ Responds with Requested Resources or ❌ Authentication/Authorization Failure AC-->>AC: ⏰ Periodic rotation of Kubeconfig in OIDC Secret
(key: greenhouseKubeconfig)
Preparation
The Greenhouse cluster should expose the /.well-known/openid-configuration over an unauthenticated endpoint to allow
remote clusters to fetch the OIDC configuration.
Some cloud providers or managed Kubernetes services might not expose the Service Account Issuer Discovery as an unauthenticated endpoint. In such cases, you can serve this configuration from a different endpoint and set this as the discoveryURL in structured authentication configuration.
Check out https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration for more information.
Configure the OIDC issuer in the Structured Authentication Configuration of the remote cluster.
Example Structured Authentication Configuration file
apiVersion: apiserver.config.k8s.io/v1beta1
kind: AuthenticationConfiguration
jwt:
- issuer:
url: https://<greenhouse-service-account-issuer>
audiences:
- greenhouse # audience should be greenhouse
claimMappings:
username:
claim: 'sub' # claim to be used as username
prefix: 'greenhouse:' # prefix to be added to the username to prevent impersonation (can be any string of your choice)
# additional trusted issuers
# - issuer:
Add RBAC rules to the remote cluster, authorizing Greenhouse to manage Kubernetes resources.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: greenhouse-<cluster-name>-oidc-access
subjects:
- kind: User
apiGroup: rbac.authorization.k8s.io
name: greenhouse:system:serviceaccount:<your-organization-namespace>:<cluster-name>
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
The subject kind User name must follow the pattern of
<prefix>:system:serviceaccount:<your-organization-namespace>:<cluster-name>.
<prefix> is the prefix used in the Structured Authentication Configuration file for the username claim mapping.
For convenience purposes, the `prefix` is set to `greenhouse:` in the example `Structured Authentication Configuration`
but it can be any string identifier of your choice.
If you use '-' in prefix, for example, `identifier-` then the subject name should be `identifier-system:serviceaccount:<your-organization-namespace>:<cluster-name>`.
Onboard
You can now onboard the remote Cluster to your Greenhouse Organization by applying a Secret in the following format:
apiVersion: v1
kind: Secret
metadata:
annotations:
"oidc.greenhouse.sap/api-server-url": "https://<remote-cluster-api-server-url>"
name: <cluster-name> # ensure the name provided here is the same as the <cluster-name> in the ClusterRoleBinding
namespace: <organization-namespace>
data:
ca.crt: <double-encoded-ca.crt> # remote cluster CA certificate base64 encoded
type: greenhouse.sap/oidc # secret type
Mandatory fields:
- the annotation
oidc.greenhouse.sap/api-server-urlmust have a valid URL pointing to the remote cluster’s API server - the
ca.crtfield must contain the remote cluster’s CA certificate - the type of the Secret must be
greenhouse.sap/oidc - the name of the secret must equal the
<cluster-name>used in theClusterRoleBindingSubject
ca.crt is the certificate-authority-data from the kubeconfig file of the remote cluster.
The certificate-authority-data can be extracted from the ConfigMap kube-root-ca.crt. This ConfigMap is present in every Namespace.
If the certificate is extracted from kube-root-ca.crt then it should be base64 encoded twice before adding it to the
secret.
example:
$ kubectl get configmap kube-root-ca.crt -n kube-system -o jsonpath='{.data.ca\.crt}' | base64 | base64
If the certificate is extracted from the KubeConfig file then the certificate is already base64 encoded, so the encoding is needed only once.
Apply the Secret to the Organization Namespace to onboard the remote cluster.
$ kubectl apply -f <oidc-secret-file>.yaml
Troubleshooting
If the bootstrapping failed, you can find details about why it failed in the Cluster.status.statusConditions.
More precisely, there will be conditions of type=KubeConfigValid, type=PermissionsVerified, type=ManagedResourcesDeployed, and type=Ready, each of which may provide helpful context in the message field.
These conditions are also displayed in the UI on the Cluster details view.
If there is any error message regarding RBAC then check the ClusterRoleBinding and ensure the subject name is correct
If there is any authentication error then you might see a message similar to
the server has asked for the client to provide credentials,
in such cases verify the Structured Authentication Configuration and ensure the issuer and audiences are correct.
The API Server logs in the remote cluster will provide more information on the authentication errors.
2.2.3 - Cluster offboarding
Content Overview
This guides describes how to off-board an existing Kubernetes cluster in your Greenhouse organization.
While all members of an organization can see existing clusters, their management requires org-admin or
cluster-admin privileges. See RBAC with the Organization namespace for details.
:information_source: The UI is currently in development. For now this guide describes the onboarding workflow via command line.
Pre-requisites
Offboarding a Cluster in Greenhouse requires authenticating to the greenhouse cluster via kubeconfig file:
greenhouse: The cluster where Greenhouse installation is running on.organization-adminorcluster-adminprivileges is needed for deleting aClusterresource.
Schedule Deletion
By default Cluster resource deletion is blocked by ValidatingWebhookConfiguration in Greenhouse.
This is done to prevent accidental deletion of cluster resources.
List the clusters in your Greenhouse organization:
kubectl --namespace=<greenhouse-organization-name> get clusters
A typical output when you run the command looks like
NAME AGE ACCESSMODE READY
mycluster-1 15d direct True
mycluster-2 35d direct True
mycluster-3 108d direct True
Delete a Cluster resource by annotating it with greenhouse.sap/delete-cluster: "true".
Example:
kubectl annotate cluster mycluster-1 greenhouse.sap/delete-cluster=true --namespace=my-org
Once the Cluster resource is annotated, the Cluster will be scheduled for deletion in 48 hours (UTC time).
This is reflected in the Cluster resource annotations and in the status conditions.
View the deletion schedule by inspecting the Cluster resource:
kubectl get cluster mycluster-1 --namespace=my-org -o yaml
A typical output when you run the command looks like
apiVersion: greenhouse.sap/v1alpha1
kind: Cluster
metadata:
annotations:
greenhouse.sap/delete-cluster: "true"
greenhouse.sap/deletion-schedule: "2025-01-17 11:16:40"
finalizers:
- greenhouse.sap/cleanup
name: mycluster-1
namespace: my-org
spec:
accessMode: direct
kubeConfig:
maxTokenValidity: 72
status:
...
statusConditions:
conditions:
...
- lastTransitionTime: "2025-01-15T11:16:40Z"
message: deletion scheduled at 2025-01-17 11:16:40
reason: ScheduledDeletion
status: "False"
type: Delete
In order to cancel the deletion, you can remove the greenhouse.sap/delete-cluster annotation:
kubectl annotate cluster mycluster-1 greenhouse.sap/delete-cluster- --namespace=my-org
the
-at the end of the annotation name is used to remove the annotation.
Impact
When a Cluster resource is scheduled for deletion, all Plugin resources associated with the Cluster resource will skip the reconciliation process.
When the deletion schedule is reached, the Cluster resource will be deleted and all associated resources Plugin resources will be deleted as well.
Immediate Deletion
In order to delete a Cluster resource immediately -
- annotate the
Clusterresource withgreenhouse.sap/delete-cluster. (see Schedule Deletion) - update the
greenhouse.sap/deletion-scheduleannotation to the current date and time.
You can also annotate the Cluster resource with greenhouse.sap/delete-cluster and greenhouse.sap/deletion-schedule at the same time and set the current date and time for deletion.
The time and date should be in
YYYY-MM-DD HH:MM:SSformat or golang’stime.DateTimeformat. The time should be in UTC timezone.
Troubleshooting
If the cluster deletion has failed, you can troubleshoot the issue by inspecting -
Clusterresource status conditions, specifically theKubeConfigValidcondition.- status conditions of the
Pluginresources associated with theClusterresource. There will be a clear indication of the issue inHelmReconcileFailedcondition.
2.3 - Plugin management
Plugins extends the capabilities of the Greenhouse cloud operations platform, adding specific features or functionalities to tailor and enhance the platform for specific organizational needs.
These plugins are integral to Greenhouse’ extensibility, allowing users to customize their cloud operations environment and address unique requirements while operating within the Greenhouse ecosystem.
This section provides guides for the management of plugins for Kubernetes clusters within Greenhouse.
2.3.1 - Testing a Plugin
Overview

Plugin Testing Requirements
All Plugins contributed to Plugin-Extensions repository should include comprehensive Helm Chart Tests using the bats/bats-detik testing framework. This ensures our Plugins are robust, deployable, and catch potential issues early in the development cycle.
What is bats/bats-detik?
The bats/bats-detik framework simplifies end-to-end (e2e) Testing in Kubernetes. It combines the Bash Automated Testing System (bats) with Kubernetes-specific assertions (detik). This allows you to write test cases using natural language-like syntax, making your tests easier to read and maintain.
Implementing Tests
Create a
/testsfolder inside your Plugin’s Helm Charttemplatesfolder to store your test resources.ConfigMap definition:
- Create a
test-<plugin-name>-config.yamlfile in thetemplates/testsdirectory to define aConfigMapthat will hold your test script. - This
ConfigMapcontains the test scriptrun.shthat will be executed by the testPodto run your tests.
- Create a
{{- if .Values.testFramework.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-test
namespace: {{ .Release.Namespace }}
labels:
type: integration-test
data:
run.sh: |-
#!/usr/bin/env bats
load "/usr/lib/bats/bats-detik/utils"
load "/usr/lib/bats/bats-detik/detik"
DETIK_CLIENT_NAME="kubectl"
@test "Verify successful deployment and running status of the {{ .Release.Name }}-operator pod" {
verify "there is 1 deployment named '{{ .Release.Name }}-operator'"
verify "there is 1 service named '{{ .Release.Name }}-operator'"
try "at most 2 times every 5s to get pods named '{{ .Release.Name }}-operator' and verify that '.status.phase' is 'running'"
}
@test "Verify successful creation and bound status of {{ .Release.Name }} persistent volume claims" {
try "at most 3 times every 5s to get persistentvolumeclaims named '{{ .Release.Name }}.*' and verify that '.status.phase' is 'Bound'"
}
@test "Verify successful creation and available replicas of {{ .Release.Name }} Prometheus resource" {
try "at most 3 times every 5s to get prometheuses named '{{ .Release.Name }}' and verify that '.status.availableReplicas' is more than '0'"
}
@test "Verify creation of required custom resource definitions (CRDs) for {{ .Release.Name }}" {
verify "there is 1 customresourcedefinition named 'prometheuses'"
verify "there is 1 customresourcedefinition named 'podmonitors'"
}
{{- end -}}
Note: You can use this guide for reference when writing your test assertions.
Test Pod Definition:
- Create a
test-<plugin-name>.yamlfile in thetemplates/testsdirectory to define aPodthat will run your tests. - This test
Podwill mount theConfigMapcreated in the previous step and will execute the test scriptrun.sh.
- Create a
{{- if .Values.testFramework.enabled -}}
apiVersion: v1
kind: Pod
metadata:
name: {{ .Release.Name }}-test
namespace: {{ .Release.Namespace }}
labels:
type: integration-test
annotations:
"helm.sh/hook": test
"helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
spec:
serviceAccountName: {{ .Release.Name }}-test
containers:
- name: bats-test
image: "{{ .Values.testFramework.image.registry}}/{{ .Values.testFramework.image.repository}}:{{ .Values.testFramework.image.tag }}"
imagePullPolicy: {{ .Values.testFramework.image.pullPolicy }}
command: ["bats", "-t", "/tests/run.sh"]
volumeMounts:
- name: tests
mountPath: /tests
readOnly: true volumes:
- name: tests
configMap:
name: {{ .Release.Name }}-test
restartPolicy: Never
{{- end -}}
- RBAC Permissions:
- Create the necessary RBAC resources in the
templates/testsfolder with a dedicatedServiceAccountand role authorisations so that the testPodcan cover test the cases. - You can use test-permissions.yaml from the
kube-monitoringas a reference to configure RBAC permissions for your test Pod.
- Configure the Test Framework in Plugin’s
values.yaml:- Add the following configuration to your Plugin’s
values.yamlfile:
- Add the following configuration to your Plugin’s
testFramework:
enabled: true
image:
registry: ghcr.io
repository: cloudoperators/greenhouse-extensions-integration-test
tag: main
imagePullPolicy: IfNotPresent
- Running the Tests:
Important: Once you have completed all the steps above, you are ready to run the tests. However, before running the tests, ensure that you perform a fresh Helm installation or upgrade of your Plugin’s Helm release against your test Kubernetes cluster (for example, Minikube or Kind) by executing the following command:
# For a new installation
helm install <Release name> <chart-path>
# For an upgrade
helm upgrade <Release name> <chart-path>
- After the Helm installation or upgrade is successful, run the tests against the same test Kubernetes Cluster by executing the following command.
helm test <Release name>
Plugin Testing with dependencies during Pull Requests
Overview
Some Plugins require other Plugins to be installed in the Cluster for their tests to run successfully. To support this, each Plugin can declare required dependencies using a test-dependencies.yaml file.
[!NOTE]
Thetest-dependencies.yamlfile is required if other Plugins need to be installed in the Kind Cluster created by the GitHub Actions workflow before running tests during a Pull Request for the Plugin.
How It Works
- Each Plugin can optionally include a
test-dependencies.yamlfile in the Plugin’s root directory (e.g.,Thanos/test-dependencies.yaml). - This file defines both the dependencies (other Plugins) that should be installed before testing begins and custom values for these dependencies.
Example test-dependencies.yaml
dependencies:
- kube-monitoring
values:
kubeMonitoring:
prometheus:
enabled: true
serviceMonitor:
enabled: false
prometheusSpec:
thanos:
objectStorageConfig:
secret:
type: FILESYSTEM
config:
directory: "/test"
prefix: ""
In this example, the Plugin:
- Declares
kube-monitoringas a dependency that must be installed first - Provides custom values for this dependent Plugin, specifically configuring Prometheus settings
Dependency Structure
The test-dependencies.yaml file supports:
- dependencies: A list of Plugin names that should be installed before testing the current Plugin.
- values: Custom configuration values to be applied when installing dependencies
Automation during Pull Requests
The GitHub Actions workflow automatically:
- Detects Plugins that are changed in the Pull Request.
- Parses the
test-dependencies.yamlfor each changed Plugin if present. - Installs listed dependencies in order
- Proceeds with Helm Chart linting and testing
Testing Values Configuration
Parent Plugin Configuration
- A Plugin may optionally provide a
<plugin-name>/ci/test-values.yamlfile - The GitHub Actions workflow will use this values file for testing the Plugin if it exists
- This allows you to customize values specifically for CI testing, without modifying the default
values.yaml
Dependent Plugin Configuration
- Values for dependent Plugins should be specified in the values section of your Plugin’s
test-dependencies.yamlfile. - This allows you to customize the configuration of dependent Plugins when they are installed for testing.
- The values specified in the
test-dependencies.yamlfile will override the default values of the dependent Plugins.
Example File Structure:
alert/
├── charts/
├── ci/
│ └── test-values.yaml
└── test-dependencies.yaml
Contribution Checklist
Before submitting a Pull Request:
- Ensure your Plugin’s Helm Chart includes a
/testsdirectory. - Verify the presence of
test-<plugin-name>.yaml,test-<plugin-name>-config.yaml, andtest-permissions.yamlfiles. - Test your Plugin thoroughly using
helm test <release-name>and confirm that all tests pass against a test Kubernetes Cluster. - Include a brief description of the tests in your Pull Request.
- Make sure that your Plugin’s Chart Directory and the Plugin’s Upstream Chart Repository are added to this Greenhouse-Extensions Helm Test Config File. This will ensure that your Plugin’s tests are automatically run in the GitHub Actions workflow when you submit a Pull Request for this Plugin.
- Note that the dependencies of your Plugin’s Helm Chart might also have their own tests. If so, ensure that the tests of the dependencies are also passing.
- If your Plugin relies on other Plugins for testing, please follow the Plugin Testing with Dependencies section for declaring those dependencies.
Important Notes
- Test Coverage: Aim for comprehensive test coverage to ensure your Plugin’s reliability.
Next Steps
2.3.2 - Plugin deployment
Before you begin
This guides describes how to configure and deploy a Greenhouse plugin.
apiVersion: greenhouse.sap/v1alpha1
kind: Plugin
metadata:
name: kube-monitoring-martin
namespace: <organization namespace> # same namespace in remote cluster for resources
spec:
clusterName: <name of the remote cluster >
disabled: false
displayName: <any human readable name>
pluginDefinition: <pluginDefinition name>
releaseNamespace: <namespace> # namespace in remote cluster where the plugin is deployed
releaseName: <helm release name> # name of the helm release that will be created
optionValues:
- name: <from the plugin options>
value: <from the plugin options>
- ...
Exposed services and ingresses
Plugins deploying Helm Charts into remote clusters support exposing their services and ingresses in two ways:
Service exposure via service-proxy
Services can be exposed through Greenhouse’s central service-proxy by adding this annotation:
annotations:
greenhouse.sap/expose: "true"
For services with multiple ports, you can specify which port to expose:
annotations:
greenhouse.sap/expose: "true"
greenhouse.sap/exposed-named-port: "https" # optional, defaults to first port
Direct ingress exposure
Ingresses can be exposed directly using their external URLs:
annotations:
greenhouse.sap/expose: "true"
greenhouse.sap/exposed-host: "api.example.com" # optional, for multi-host ingresses
Both types of exposures appear in the Plugin’s status.exposedServices with different types: service or ingress.
Deploying a Plugin
Create the Plugin resource via the command:
kubectl --namespace=<organization name> create -f plugin.yaml
After deployment
Check with
kubectl --namespace=<organization name> get pluginhas been properly created. When all components of the plugin are successfully created, the plugin should show the state configured.Check in the remote cluster that all plugin resources are created in the organization namespace.
URLs for exposed services and ingresses
After deploying the plugin to a remote cluster, the ExposedServices section in Plugin’s status provides an overview of the exposed resources. It maps URLs to both services and ingresses found in the manifest.
Service-proxy URLs (for services)
- Services exposed through service-proxy use the pattern:
https://$cluster--$hash.$organization.$basedomain - The
$hashis computed fromservice--$namespace
Direct ingress URLs (for ingresses)
- Ingresses are exposed using their actual hostnames:
https://api.example.comorhttp://internal.service.com - Protocol (http/https) is automatically detected from the ingress TLS configuration
- The host is taken from
greenhouse.sap/exposed-hostannotation or defaults to the first host rule
Both types are listed together in status.exposedServices with their respective types for easy identification.
Next Steps
2.3.3 - Managing Plugins for multiple clusters
Managing Plugins for multiple clusters
This guide describes how to configure and deploy a Greenhouse Plugin with the same configuration into multiple clusters.
The PluginPreset resource is used to create and deploy Plugins with a the identical configuration into multiple clusters. The list of clusters the Plugins will be deployed to is determind by a LabelSelector.
As a result, whenever a cluster, that matches the ClusterSelector is onboarded or offboarded, the Controller for the PluginPresets will take care of the Plugin Lifecycle. This means creating or deleting the Plugin for the respective cluster.
The same validation applies to the PluginPreset as to the Plugin. This includes immutable PluginDefinition and ReleaseNamespace fields, as well as the validation of the OptionValues against the PluginDefinition.
In case the PluginPreset is updated all of the Plugin instances that are managed by the PluginPreset will be updated as well. Each Plugin instance that is created from a PluginPreset has a label greenhouse.sap/pluginpreset: <PluginPreset name>. Also the name of the Plugin follows the scheme <PluginPreset name>-<cluster name>.
Changes that are done directly on a Plugin which was created from a PluginPreset will be overwritten immediately by the PluginPreset Controller. All changes must be performed on the PluginPreset itself. If a Plugin already existed with the same name as the PluginPreset would create, this Plugin will be ignored in following reconciliations.
A PluginPreset with the annotation greenhouse.sap/prevent-deletion may not be deleted. This is to prevent the accidental deletion of a PluginPreset including the managed Plugins and their deployed Helm releases. Only after removing the annotation it is possible to delete a PluginPreset.
Example PluginPreset
apiVersion: greenhouse.sap/v1alpha1
kind: PluginPreset
metadata:
name: kube-monitoring-preset
namespace: <organization namespace>
spec:
plugin: # this embeds the PluginSpec
displayName: <any human readable name>
pluginDefinition: <PluginDefinition name> # k get plugindefinition
releaseNamespace: <namespace> # namespace where the plugin is deployed to on the remote cluster. Will be created if not exists
optionValues:
- name: <from the PluginDefinition options>
value: <from the PluginDefinition options>
- ..
clusterSelector: # LabelSelector for the clusters the Plugin should be deployed to
matchLabels:
<label-key>: <label-value>
clusterOptionOverrides: # allows you to override specific options in a given cluster
- clusterName: <cluster name where we want to override values>
overrides:
- name: <option name to override>
value: <new value>
- ..
- ..
See Writing a PluginPreset Spec for more details on how to configure a PluginPreset.
Next Steps
2.3.4 - Plugin Catalog
Before you begin
This guides describes how to explore the catalog of Greenhouse PluginDefinitions.
While all members of an organization can see the Plugin catalog, enabling, disabling and configuration PluginDefinitions for an organization requires organization admin privileges.
Exploring the PluginDefinition catalog
The PluginDefinition resource describes the backend and frontend components as well as mandatory configuration options of a Greenhouse extension.
While the PluginDefinition catalog is managed by the Greenhouse administrators and the respective domain experts, administrators of an organization can configure and tailor Plugins to their specific requirements.
NOTE: The UI also provides a preliminary catalog of Plugins under Organization> Plugin> Add Plugin.
Run the following command to see all available PluginDefinitions.
$ kubectl get plugindefinition NAME VERSION DESCRIPTION AGE cert-manager 1.1.0 Automated certificate management in Kubernetes 182d digicert-issuer 1.2.0 Extensions to the cert-manager for DigiCert support 182d disco 1.0.0 Automated DNS management using the Designate Ingress CNAME operator (DISCO) 179d doop 1.0.0 Holistic overview on Gatekeeper policies and violations 177d external-dns 1.0.0 The kubernetes-sigs/external-dns plugin. 186d heureka 1.0.0 Plugin for Heureka, the patch management system. 177d ingress-nginx 1.1.0 Ingress NGINX controller 187d kube-monitoring 1.0.1 Kubernetes native deployment and management of Prometheus, Alertmanager and related monitoring components. 51d prometheus-alertmanager 1.0.0 Prometheus alertmanager 60d supernova 1.0.0 Supernova, the holistic alert management UI 187d teams2slack 1.1.0 Manage Slack handles and channels based on Greenhouse teams and their members 115d
Next Steps
2.4 - Team management
A team is a group of users with shared responsibilities for managing and operating cloud resources within a Greenhouse organization.
These teams enable efficient collaboration, access control, and task assignment, allowing organizations to effectively organize their users and streamline cloud operations within the Greenhouse platform.
This section provides guides for the management of teams within an organization.
2.4.1 - Role-based access control on remote clusters
Greenhouse Team RBAC user guide
Role-Based Access Control (RBAC) in Greenhouse allows Organization administrators to manage the access of Teams on Clusters. TeamRole and TeamRoleBindings are used to manage the RBAC on remote Clusters. These two Custom Resource Definitions allow for fine-grained control over the permissions of each Team within each Cluster and Namespace.
Contents
Before you begin
This guide is intended for users who want to manage Role-Based Access Control (RBAC) for Teams on remote clusters managed by Greenhouse. It assumes you have a basic understanding of Kubernetes RBAC concepts and the Greenhouse platform.
🔑 Permissions
- Create/Update TeamRoles and TeamRoleBindings in the Organization namespace.
- View Teams and Clusters in the Organization namespace
By default the necessary authorizations are provieded via the role:<organization>:admin RoleBinding that is granted to members of the Organizations Admin Team.
You can check the permissions inside the Organization namespace by running the following command:
kubectl auth can-i --list --namespace=<organization-namespace>
💻 Software
- kubectl: The Kubernetes command-line tool which allows you to manage Kubernetes cluster resources.
Overview
- TeamRole: Defines a set of permissions that can be assigned to teams and individual users.
- TeamRoleBinding: Assigns a TeamRole to a specific Team and/or a list of users fo Clusters and (optionally) Namespaces.
Defining TeamRoles
TeamRoles define the actions a Team can perform on a Kubernetes cluster. For each Organziation a set of TeamRoles is seeded. The syntax of the TeamRole’s .spec is following the Kubernetes RBAC API.
Example
This TeamRole named pod-read grants read access to Pods.
apiVersion: greenhouse.sap/v1alpha1
kind: TeamRole
metadata:
name: pod-read
spec:
rules:
- apiGroups:
- ""
resources:
- "pods"
verbs:
- "get"
- "list"
Seeded default TeamRoles
Greenhouse provides a set of default TeamRoles that are seeded to all clusters:
| TeamRole | Description | APIGroups | Resources | Verbs |
|---|---|---|---|---|
cluster-admin | Full privileges | * | * | * |
cluster-viewer | get, list and watch all resources | * | * | get, list, watch |
cluster-developer | Aggregated role. Greenhouse aggregates the application-developer and the cluster-viewer. Further TeamRoles can be aggregated. | |||
application-developer | Set of permissions on pods, deployments and statefulsets necessary to develop applications on k8s | apps | deployments, statefulsets | patch |
| "" | pods, pods/portforward, pods/eviction, pods/proxy, pods/log, pods/status, | get, list, watch, create, update, patch, delete | ||
node-maintainer | get and patch nodes | "" | nodes | get, patch |
namespace-creator | All permissions on namespaces | "" | namespaces | * |
Defining TeamRoleBindings
TeamRoleBindings link a Team, a TeamRole, one or more Clusters and optionally one or more Namespaces together. Once the TeamRoleBinding is created, the Team will have the permissions defined in the TeamRole within the specified Clusters and Namespaces. This allows for fine-grained control over the permissions of each Team within each Cluster. The TeamRoleBinding Controller within Greenhouse deploys RBAC resources to the targeted Clusters. The referenced TeamRole is created as a rbacv1.ClusterRole. In case the TeamRoleBinding references a Namespace, it is considered to be namespace-scoped. Hence, the controller will create a rbacv1.RoleBinding which links the Team with the rbacv1.ClusterRole. In case no Namespace is referenced, the Controller will create a cluster-scoped rbacv1.ClusterRoleBinding instead.
Assigning TeamRoles to Teams on a single Cluster
Roles are assigned to Teams through the TeamRoleBinding configuration, which links Teams to their respective roles within specific clusters.
This TeamRoleBinding assigns the pod-read TeamRole to the Team named my-team in the Cluster named my-cluster.
Example: team-rolebindings.yaml
apiVersion: greenhouse.sap/v1alpha2
kind: TeamRoleBinding
metadata:
name: my-team-read-access
spec:
teamRef: my-team
roleRef: pod-read
clusterSelector:
clusterName: my-cluster
Assigning TeamRoles to Teams on multiple Clusters
A LabelSelector can be used to assign a TeamRoleBinding to multiple Clusters.
This TeamRoleBinding assigns the pod-read TeamRole to the Team named my-team in all Clusters that have the label environment: production set.
apiVersion: greenhouse.sap/v1alpha2
kind: TeamRoleBinding
metadata:
name: production-cluster-admins
spec:
teamRef: my-team
roleRef: pod-read
clusterSelector:
labelSelector:
matchLabels:
environment: production
Aggregating TeamRoles
It is possible with Kubernetes RBAC to aggregate rbacv1.ClusterRoles. This is also supported for TeamRoles. All label specified on a TeamRole’s .spec.Labels will be set on the rbacv1.ClusterRole created on the target cluster. This makes it possible to aggregate multiple rbacv1.ClusterRole resources by using a rbacv1.AggregationRule. This can be specified on a TeamRole by setting .spec.aggregationRule.
More details on the concept of Aggregated ClusterRoles can be found in the Kubernetes documentation: Aggregated ClusterRoles
[!NOTE] A TeamRole is only created on a cluster if it is referenced by a TeamRoleBinding. If a TeamRole is not referenced by a TeamRoleBinding it will not be created on any target cluster. A TeamRoleBinding referencing a TeamRole with an aggregationRule will only provide the correct access, if there is at least one TeamRoleBinding referencing a TeamRole with the corresponding label deployed to the same cluster.
The following example shows how an AggregationRule can be used with TeamRoles and TeamRoleBindings.
This TeamRole specifies .spec.Labels. The labels will be applied to the resulting ClusterRole on the target cluster.
apiVersion: greenhouse.sap/v1alpha1
kind: TeamRole
metadata:
name: pod-read
spec:
labels:
aggregate: "true"
rules:
- apiGroups:
- ""
resources:
- "pods"
verbs:
- "get"
- "list"
This TeamRoleBinding assigns the pod-read TeamRole to the Team named my-team in all Clusters with the label environment: production.
apiVersion: greenhouse.sap/v1alpha2
kind: TeamRoleBinding
metadata:
name: production-pod-read
spec:
teamRef: my-team
roleRef: pod-read
clusterSelector:
labelSelector:
matchLabels:
environment: production
Access granted by TeamRoleBinding can also be restricted to specified Namespaces. This can be achieved by specifying the .spec.namespaces field in the TeamRoleBinding.
Setting dedicated Namespaces results in RoleBindings being created in the specified Namespaces. The Team will then only have access to the Pods in the specified Namespaces. The TeamRoleBinding controller will create a non-existing Namespace, only if the field .spec.createNamespaces is set to true on the TeamRoleBinding. If this field is not set, the TeamRoleBinding controller will not create the Namespace or the RBAC resources.
Deleting a TeamRoleBinding will only result in the deletion of the RBAC resources but will never result in the deletion of the Namespace.
apiVersion: greenhouse.sap/v1alpha2
kind: TeamRoleBinding
metadata:
name: production-pod-read
spec:
teamRef: my-team
roleRef: pod-read
clusterSelector:
labelSelector:
matchLabels:
environment: production
namespaces:
- kube-system
# createNamespaces: true # optional, if set the TeamRoleBinding will create the namespaces if they do not exist
This TeamRole has a .spec.aggregationRule set. This aggregationRule will be added to the ClusterRole created on the target clusters. With the aggregationRule set it will aggregate the ClusterRoles created by the TeamRoles with the label aggregate: "true". The Team will have the permissions of both TeamRoles and will be able to get, list, update and patch Pods.
apiVersion: greenhouse.sap/v1alpha1
kind: TeamRole
metadata:
name: aggregated-role
spec:
aggregationRule:
clusterRoleSelectors:
- matchLabels:
"aggregate": "true"
apiVersion: greenhouse.sap/v1alpha2
kind: TeamRoleBinding
metadata:
name: aggregated-rolebinding
spec:
teamRef: operators
roleRef: aggregated-role
clusterSelector:
labelSelector:
matchLabels:
environment: production
Updating TeamRoleBindings
Updating the RoleRef of a ClusterRoleBinding and RoleBinding is not allowed, but requires recreating the TeamRoleBinding resources. See ClusterRoleBinding docs for more information. This is to allow giving out permissions to update the subjects, while avoiding that privileges are changed. Furthermore, changing the TeamRole can change the extent of a binding significantly. Therefore it needs to be recreated.
After the TeamRoleBinding has been created, it can be updated with some limitations. Similarly to RoleBindings, the .spec.roleRef and .spec.teamRef can not be changed.
The TeamRoleBinding’s .spec.namespaces can be amended to include more namespaces. However, the scope of the TeamRoleBinding cannot be changed. If a TeamRoleBinding has been created with .spec.namespaces specified, it is namespace-scoped, and cannot be changed to cluster-scoped by removing the .spec.namespaces. The reverse is true for a cluster-scoped TeamRoleBinding, where it is not possible to add .spec.namespaces once created.
2.4.2 - Team creation
Before you begin
This guides describes how to create a team in your Greenhouse organization.
While all members of an organization can see existing teams, their management requires organization admin privileges.
Creating a team
The team resource is used to structure members of your organization and assign fine-grained access and permission levels.
Each Team must be backed by a group in the identity provider (IdP) of the Organization.
- IdP group should be set on the
mappedIdPGroupfield in Team configuration. - This, along with SCIM API configured in the Organization, allows for synchronization of Team members with Greenhouse.
NOTE: The UI is currently in development. For now this guides describes the onboarding workflow via command line.
- To onboard a new cluster provide the kubeconfig file with a static, short-lived token.
It should look similar to this example:cat <<EOF | kubectl apply -f - apiVersion: greenhouse.sap/v1alpha1 kind: Team metadata: name: <name> spec: description: My new team mappedIdPGroup: <IdP group name> EOF
3 - Architecture
This section provides an overview of the architecture and design of the Greenhouse platform.
3.1 - Architecture
Greenhouse components
From a high-level perspective, the Greenhouse platform consists of these main components:
- Greenhouse Central Cluster: The API Server of the central Greenhouse cluster serves as the API endpoint that acts as the primary interface for users to interact with the Greenhouse platform. The API consists of the Greenhouse Custom Resource Definitions (CRDs). Interactions with the API are possible via the Greenhouse dashboard and the
kubectlcommand line tool. The Greenhouse operators run inside this central cluster. - Remote Clusters: The are the clusters that are onboarded into Greenhouse, so that the Greenhouse operators can manage the lifecycle of Greenhouse resources in these clusters.
Greenhouse API
The Greenhouse API serves as the backbone of the platform, offering a familiar interface for interacting with Greenhouse. It is deliberately not exposing all the Kubernetes APIs to the users, but uses RBAC to limit the available resources to the ones that are relevant for the use of Greenhouse. For example it is not permitted to run arbitrary workload resources inside of the Greenhouse central clusters.
Greenhouse Clusters
When talking about clusters in the context of Greenhouse, we are referring to two different types of clusters:
Central cluster
This is the cluster where all of the Greenhouse components are running. It is the central point of access for users to interact with the platform. The dashboard, Kubernetes API and the operator are all running in this cluster. It is possible to mutliple organizations on one central cluster. They are isolated by dedicated Kubernetes Namespaces created for each Organization. The Kubernetes API access is limited to the Custom Resource Definitions (CRDs) that are relevant for the Greenhouse platform, such as Organizations, Teams, Clusters, TeamRoleBindings, PluginPresets and more.
Users of the Greenhouse cloud operations platform, depending on their roles, can perform tasks such as managing Organizations, configuring and using Plugins, monitoring resources, developing custom PluginDefinitions, and conducting audits to ensure compliance with standards. Greenhouse’s flexibility allows users to efficiently manage cloud infrastructure and applications while tailoring their experience to organizational needs. The configuration and metadata is persisted in Kubernetes custom resource definitions (CRDs), acted upon by the Greenhouse operator and managed in the remote cluster.
Remote cluster
When referring to a remote cluster we are talking about the clusters that are onboarded into Greenhouse. Onboarding means that a valid KubeConfig is provided so that the Greenhouse operator can access the cluster and manage the resources in it. Managing and operating Kubernetes clusters can be challenging due to the complexity of tasks related to orchestration, scaling, and ensuring high availability in containerized environments.
By onboarding their Kubernetes clusters into Greenhouse, users can centralize cluster management, streamlining tasks like resource monitoring and access control. This integration enhances visibility, simplifies operational tasks, and ensures better compliance, enabling users to efficiently manage and optimize their Kubernetes infrastructure. While the central cluster contains the user configuration and metadata, all workloads of user-selected Plugins are run in the remote cluster and managed by Greenhouse. More information about the Cluster resources can be found here.
Organizations & Authentication
The Greenhouse platform is designed to support multiple organizations, each with its own set of users and permissions. Each organization can have multiple teams, and each team can have its own set of roles and permissions. The Greenhouse API provides a way to manage these organizations, teams, and roles. The Organization is a cluster-scoped resource for which a namespace with the same name will be created. When creating an Organization an identity provider (IdP) needs to be specified. All users in this IdP have read access to the resources in the Organization’s namespace. Greenhouse will automatically provision a set of RBAC roles, view RBAC within the Organization namespace for details.
In order to make the Kubernetes API available for multiple organizations, Greenhouse provides an idproxy build on-top of Dex, which allows to handle different identity providers (IdP) when authenticating users against the Kubernetes API.
(via OIDC)"] organization -. specifies .- idp team -- maps to IdP Group --> idp idproxy -- AuthN & AuthZ -->idp enduser <--> dashboard enduser -- manages Greenhouse resources --> kubectl --> k8s dashboard -- watches & manages Greenhouse resources --> k8s k8s --> idproxy
Remote Cluster management with Plugins & Team RBAC
Greenhouse provides a way to manage access and tooling (e.g. monitoring, security, compliance, etc.) on a Kubernetes cluster through the use of Plugins and TeameRoleBindings. Plugins are used to deploy and manage workloads (e.g. Prometheus, Open Telemetry, Cert-Manager, etc.) in the remote clusters, while TeamRoleBindings are used to manage access to the remote clusters through Kubernetes RBAC. Details about Team RBAC can be found here.
The Plugin API is a key feature of Greenhouse, allowing domain experts to extend the core platform with custom functionality. Greenhouse provides rollout and lifecyle management of Plugins to onboarded Kubernetes Clusters. PluginDefinitions define a Helm chart and/or UI (to be displayed on the Greenhouse dashboard) with pre-configured default values. A PluginPreset can be used to create and configure Plugins for a set of Clusters. Here you can find more information about the Plugin API.
Access in the remote clusters is managed via TeamRole and TeamRoleBinding resources. TeamRoles define the permissions, similar to RBAC Roles & ClusterRoles. The Greenhouse operator will create the necessary Kubernetes RBAC resources in the remote clusters based on the TeamRoleBinding. The TeamRoleBinding combines the TeamRole with a Team and defines the target Clusters and Namespaces.
3.2 - Product design
Introduction
Vision
“Greenhouse is an extendable Platform that enables Organizations to operate their Infrastructure in a compliant, efficient and transparent manner”
We want to build a Platform that is capable to integrate all the tools that are required to operate services in a cloud environment in a compliant, effective and transparent manner. Greenhouse aims to be the single stop for Operators of cloud-native infrastructure. The primary focus of Greenhouse is to provide a unified interface for all operational aspects and tools, providing a simple shared data model describing the support organization.
As every organization is different, using different tools and has different requirements the platform is build in an extendable fashion that allows a distributed development of plugins.
While initially developed for ApeiroRA the platform is explicitly designed to be of generic use and can be consumed by multiple organizations and teams.
Problem Statements
Consolidation of Toolsuite
The operation of cloud infrastructure and applications include a large amount of tasks that are supported by different tools and automations. Due to the high complexity of cloud environments often times a conglomerate of tools is used to cover all operational aspects. Confguration and setup of the operations toolchain is a complex and time-consuming task that often times lacks automation when it comes to on- and off-boarding people and setting up new teams for new projects.
Visibility of Application Specific permission concepts
At SAP, we are managing identities and access centrally. The Converged Cloud is utilizing Cloud Access Manager for this task. While it is true that we manage who has access to which access level is defined in there it starts getting complicated if you want to figure out the actual Permission Levels on individual Applications those Access Levels are mapped to.
Management of organizational Groups of People
You often have groups of people that are fulfilling a organizational purpose:
- Support Groups
- Working Groups
- etc.
We have currently no way to represent and manage those groups.
Harmonization and Standardization of Authorization Concepts
We are missing a tool that supports teams on creating access levels and profiles following a standardized naming scheme that is enforced by design and takes away the burden of coming up with names for access levels and user profiles/roles.
Single Point of Truth for Operations Metadata of an Organization
For automations, it is often critical to retrieve Metadata about an Organizational Unit:
- Who is member of a certain Group of people, that is maybe not reflecting the HR View of a Team?
- Which Tool is giving me access to data x,y,z?
- What action items are due and need to get alerted on?
- Does component x,z,y belong to my organization?
- etc. Currently, we do not have a single point of Truth for this kind of metadata and have to use a vaierity of Tools.
Terms
This section lists down Terms and description to Terms to ensure a common languague when talking in context of Greenhouse.
| Term | Description |
|---|---|
| PluginDefinition | A Greenhouse PluginDefinition provides additional features to the platform. It consists of a Juno microfrontend that integrates with the Greenhouse UI AND / OR a backend component. |
| PluginDefinitionSpec | YAML Specification describing the PluginDefinition. Contains reference to components (UI App, Helm Chart) that need to be installed. Describes mandatory, optional and default configuration values. |
| Plugin | A Plugin is a specific instance of a PluginDefinition in a Greenhouse Organization. References the PluginDefinitionSpec and actual configuration values |
| PluginPreset | A PluginPreset is managing the configuration of Plugins for a set of Clusters. Adding a new Cluster to the set will automatically create the Plugin. |
| Organization | An Organization is the overarching container for all resources in Greenhouse. One Greenhouse installation can contain multiple Organization. Each Organization is isolated on the level of Kubernetes Namespace. |
| Team | A Team is part of an Organization and consists of users. |
| TeamRole | A TeamRole that can be assigned to Teams. Roles are a static set that can used by UIs to allow/disallow actions (admin, viewer, editor) |
| TeamRoleBinding | A TeamRoleBinding assigns a TeamRole to a Team. Currently it is used to provide access to onboarded Kubernetes Clusters. |
| Cluster | A specific Kubernetes cluster to which an Organization and its members have access to and which can be onboarded to Greenhouse. |
| ClusterKubeConfig | A ClusterKubeConfig contains the KubeConfig of a Cluster. Greenhouse will provide a central registry for Clusters consumable via CLI for easier cluster access. |
| Identity Provider | Central authentication provider that provides authentication for the User of on Organization. Used by the UI and APIServer to authenticate users. |
| Authorization Provider | External system that provides authorization, e.g. team assignments for users |
| Greenhouse APIServer | Central Kubernetes APIServer for Greenhouse. Kubernetes APIServer with Greenhouse CRDs deployed. |
| OIDC Group | A Group provided by the OIDC Provider (Identity Provider) userinfo with the JWT Token. |
User Profiles
Every Application has Users / Stakeholders, so has Greenhouse. The User Profiles mentioned here give a abstract overview of considered Users / Stakeholders for the Application and the Goals and Tasks of them in context of the Platform.
Greenhouse admin
Administrator of a Greenhouse installation.
Goals
- Ensure overall function of the Greenhouse plattform
Tasks
- Create Organizations
- Enable PluginDefinitions
- Operates central infrastructure (Kubernetes cluster, operator, etc.)
- Assign initial Organization admins
Organization admin
Administrator of a Greenhouse Organization
Goals
- Manage organization-wide resources
Tasks
- configure Plugins for the Organization
- Create and manage Teams for the Organization
- Onboard and manage Kubernetes clusters for the Organization
Organization Cluster admin
Administrator of a Greenhouse Organization’s Kubernetes cluster
Goals
- Manage an Organizations Clusters
Tasks
- configure Plugins for the Organization
- Create and manage Team access to the Organization Cluster
- Onboard and manage Kubernetes clusters for the Organization
Organization Plugin admin
Administrator of a Greenhouse Organization’s Plugins
Goals
- Manage an Organizations Plugins
Tasks
- configure Plugins for the Organization
Organization member
Member of an Organization that accesses the UI to do ops/support tasks. Is member of one ore more teams of the organization. By default members have view permissions on Organization resources.
Goals
- Provide ops/support for the services of the organization
Tasks
- Highly dependend on Team membership and Plugins configured for the Organization
- Examples:
- Check alerts for Teams the user is assigned to
- Check policy violations for deployed resources owned by the Users Team
- Check for known vulnerabilites in services
Plugin developer
A plugin developer is developing PluginDefinitions for Greenhouse.
Goals
- Must be easy to create PluginDefinitions
- Can create and test PluginDefinitions independently
- Greenhouse provides tooling to assist creating, validating, etc. of PluginDefinitions
- Publishing the PluginDefintion to Greenhouse requires admin permissions.
Tasks
- PluginDefintion Development
- Juno UI Development
- PluginDefinition backend development
Auditor
An Auditor audits Greenhouse and/or Greenhouse PluginDefinitions for compliance with industry or regulatory standards.
Goals
- Wants to see that we have a record for all changes happening in greenhouse
- Wants to have access to resources required to audit the respective Plugin
Tasks
- Performs Audits
Greenhouse Developer
Develops parts of the Greenhouse platform (Kubernetes, Greenhouse app, Greenhouse backend, …)
Goals
- Provide Greenhouse framework
Tasks
- Provides framework for plugin developers to develop plugins
- Develops Greenhouse framework components (UI or backend)
User Stories
The User Stories outlined in this Section have the target to archive a common Understanding of the capabilities/functionalities the Platform wants to archive and the functional requirements that come with those. The Integration / Development of Functionalities is not going to be strictly bound to User Stories and they are rather used as an orientation to ensure that envisioned capabilities are not getting Blocked due to implementation details.
The details of all User Stories are subject to change based on the results of Proof of Concept implementations, User feedback or other unforseen factors.
Auditor
Auditor 01 - Audit Logging
As an Auditor, I want to see who did which action and when to verify that the Vulnerability and Patch management process is followed according to company policies and that the platform is functioning as expected.
Acceptance Criteria
- Every state-changing action is logged into an immutable log collection, including:
- What action was performed
- Who performed the action
- When was the action performed
- Every authentication to the platform is logged into an immutable log collection, including:
- Who logged in
- When was the login
Greenhouse Admin
Greenhouse Admin 01 - Greenhouse Management Dashboard
As an Greenhouse Admin, I want a central Greenhouse Management Dashboard that allows me to navigate through all organization-wide resources to be able to manage the Platform.
Acceptance Criteria
- Assuming I am on the Greenhouse Management Dashboard view, i can:
- See all Plugins, including the enabled version
- Order not enabled Plugins by last Update Date
- Plugins are Ordered by the Order Attribute
- The order attribute is a numeric value that can be changed to reflect a different ordering of the Plugin:
- 1 is ordered before 2 etc.
- The order attribute is used as well to order the Plugins on the Navigation Bar
- Navigate to “Plugin Detail View” by clicking a Plugin
- See all Organizations, including:
- Number of Organization Admins
- Number of Organization Members
- Navigate to organization creation view by clicking “Create Organization”
- Navigate to Organization Detail View by clicking a Organization
- Only Greenhouse Admin’s should be able to see the Dashboard
- The Navigation item to the Greenhouse Management Dashboard should only be visible to Greenhouse admins
Greenhouse Admin 02 - Organization Creation View
As a Greenhouse Admin, I want a Organization Creation view that allows me to create a new Organization
Acceptance Criteria
- Assuming I am on the Organization creation View, i can:
- Give a unique name for the organisation
- Provide a short description for the organization
- Provide a OIDC Group that gives Organization Admin Privileges
Greenhouse Admin & Organization Admin
Greenhouse Admin & Organization Admin 01 - Organization Detail View
As a Greenhouse Admin or Organization Admin, I want an Organization Detail view that allows me to view details about an organization
Acceptance Criteria
- Assuming I am on the organization detail View, i can:
- Can see the organization details (name/description)
- See a list of teams created for this organization
- See the list of active plugins
- Add Plugins to the organization by clicking “add Plugin”
- Change the Organization Admin Role Name
Greenhouse Admin & Organization Admin 02 - Plugin Detail View
As an Greenhouse Admin or Organizatioin Admin, I want a Plugin Detail view that allows me to see Plugin Details to be able to see details about the plugin.
Acceptance Criteria
- Assuming I am on the Plugin Detail View, I can:
- see the plugin name
- see the plugin description
- see the last update date
- see the release reference
- see the ui release refrence
- see the helm chart reference
- see the ordering attribute
- see configuration values for the plugin
- set the configuration values for the current organization
- see a change log
- see the actually released (deployed to greenhouse) version
Organization Admin
Organization Admin 01 - Organization Managment Dashboard
As an Organization Admin, I want to have an Dashboard showing me the most relevant information about my Organization to be able to manage it efficently.
Acceptance Criteria
- Assuming I am on the organisation management dashboard
- I can see a list of all teams in my organization
- I can see a list of configured plugins
- I can click a “add plugin” button to add a new plugin
- I can see a list of registered clusters
- I can click a “add cluster” button to register a cluster
Organization Admin 02 - Plugin Configuration View
As an organization admin, I want a Plugin configuration view that allows me to enable and configure greenhouse plugins for my organization
Acceptance Criteria
- Assuming I am on the Plugin configuration View, I can:
- select the type of plugin I want to configure
- enable/disable the plugin (for my org)
- remove the plugin (when already added)
- manage configuration options specific for the plugin
Organization Admin 03 - Cluster registration View
As an organization admin, I want a Cluster registration view to onboard kubernetes clusters into my organization.
Acceptance Criteria
- Assuming I am on the cluster registration view, I can:
- Get instructions how to register a kubernetes clusters
- give a name and description for the registered cluster
- After executing the provided instructions I get feedback that the cluster has been successfully registered
- A cluster can be registered to exactly one organization
Organization Admin 04 - Cluster detail View
As an organization admin, I want a Cluster detail view to get some information about a registered cluster
Acceptance Criteria
- Assuming I am on the cluster detail view, I can:
- see basic details about the cluster:
- name
- api url
- version
- node status
- de-register the cluster from my organization
- see basic details about the cluster:
Organization Admin 05 - Team Detail View
| ❗ User Story details depending on final decision of ADR-01 |
|---|
As an organization admin, i want to have a Team Detail View, with the option to configure teams based on role mapping to be to manage teams within my organization without managing the permission administration itself on the Platform
Acceptance Criteria
- Assuming I am on the Team detail view, i can:
- Change the Name of the Team
- change the description of the team
- Define a single OIDC Group that assign you this team
- Define The Greenhouse Role that you get within Greenhouse if you are a member of the team
- On Login of a User into an Organization the Platform verifies if the User has ALL required roles
Organization Admin 05 - Team Creation View
| ❗ User Story details depending on final decision of ADR-01 |
|---|
As an organization admin, i want to have a Team Creation View, to be able to create a new Team
Acceptance Criteria
- Assuming I am on the Team Creation view, I can::
- Set the name of the Team
- Set a description of the Team
- Set a OIDC Group Name that assigns users to this team
Organization Member
Organization Member 01 - Unified task inbox
As an organization member, I want a task inbox that shows my open tasks from all enabled plugins that need my attention to be on top of my tasks to fulfill across all plugins
Acceptance Criteria
- Assuming I am on the task inbox:
- I can a list of open task accross all plugins that need attention
- clicking on an open task jumps in the plugin specific UI the task belong to
- I can sort open tasks by name, plugin or date
Plugin Developer
As a Plugin Developer, I want to have a seperate Repository for my Plugin which I can own and use to configure plugin internals to have control over the Development efforts and configuration of the Plugin
Plugin Developer 01 - Decentrally Managed Plugin
As a Plugin Developer, I want to have a seperate Repository for my Plugin which I can own and use to configure plugin internals to have control over the Development efforts and configuration of the Plugin
Acceptance Criteria
- Plugin lives on his own Github Repository
- Versions are managed via Github Releases using Tags and the release to Greenhouse is managed by the Plugin:
- The version to be pulled by Greenhouse is managed by the Plugin Developer.
- I can configure the Plugin Configuration over a greenhouse.yml in the root of the repository, which at least includes (mandatory):
- description: …
- version: …
- There are optional attributes in the greenhouse.yml:
- icon: which if it has a valid absolute path to an image file on the repository makes the icon selectable as an icon in the plugin detail view (GA02)
- describes available configuration options that attributes that are required for the plugin to function
- I can specify a reference to a UI App
- I can specify a reference to Helm Charts
Plugin Developer 02 - Plugin Role Config
As a Plugin Developer i want a section within the Greenhouse.yml metadata, named “Roles” where i can setup Roles used by my Plugin
Acceptance Criteria
| ⚠️ User Story details depending on final decision of ADR-01 and are therefore not further described here |
|---|
Plugin Developer 03 - Spec Schema Validation
As a Plugin Developer I want to have the possibility to validate the schema of my greenhouse.yaml to be able to catch errors within my specification early.
Acceptance Criteria
- The schema check should support IDE’s
- The schema check should be automate-able and be integrate-able to pre-commit hooks and quality gates
- A version with a broken schema should not be release on greenhouse even when pushing for a pull of the release
- It should be visible on the Plugin detail view when an invalid schema was released with a recent version
Plugin Developer 04 - Config Value Validation
As a Plugin Developer I want to have the possibility to write custom regex checks for configuration options of my plugin that include the check to be performed on a field and an error message to be shown if configured wrong by an organization to support organization admins on configuring my plugin
Acceptance Criteria
- The validation rules should be controlled by Plugin Developer
- The validation should happen on the frontend before submitting a configuration
- The error message should be shown when a config value is provided wrong
Plugin Developer 05 - Plugin development tooling
As a plugin developer I want to have an easy setup for developing and testing greenhouse plugins
Acceptance Criteria
- Dev environment available within X Time
- Possible to have a working local setup with a “mock greenhouse apiserver”
- Has a fully working Bootstrap Project that includes Backend and Frontend which can be run locally immediately
- Has documentation
Product Stages
Overview
This Section gives an overview of the different early stages of the Platform that are beeing developed and which functional requirements need to get fulfilled within those stages.
Proof of Concept (POC)
The Proof of Concept is the stage where fundamental Framework/Platform decisions are proven to be working as intended. At this Stage the Platform is not suitable to be used by the intended audience yet but most necessary core functionalities are implemented.
The desired functionalities in this phase are:
- Frontend with Authentication
- Authorization within Greenhouse (Greenhouse Admin, Org Admin, Org Member)
- Team Management (without UI)
- Org Management (without UI)
- Greenhouse Admin User Stories (without UI)
- Dummy Plugin
- with configuration spec
- Plugin Development Setup (without Documentation)
- Plugin Versioning & Provisioning (without UI)
Minimal viable product (MVP)
This stage is considered to be the earliest stage to open the Platform for General use.
In addition to the PoC functionalities we expect the following requirements to be fulfilled:
- Integrated 3 Plugins:
- Supernova (Alerts)
- DOOP (Violations)
- Heureka
NOTE: Heureka was excluded from MVP as the Heureka API is only available at a later point in time.
- Team management
- Organization management
3.3 - Building Observability Architectures
The main terminologies used in this document can be found in core-concepts.
Introduction to Observability
Observability in software and infrastructure is essential for operating a complex cloud environment. High-quality observability will enable teams to:
- Detect and troubleshoot issues quickly,
- Maintain performance and reliability,
- Make data-driven improvements.
Core Signals
The three key signals of observability are metrics, logs, and traces, each providing unique insights contributing to a comprehensive view of a system’s health.
Metrics
Metrics are numerical data points reporting on a system health over time. Examples of metrics can be CPU usage, memory usage, request latency.
Logs
Logs are detailed records of system or application events. These can be in various formats like structured/unstructured, single-/multi-line or written to files/streamed. Logs provide text-based data for post-incident analysis and crucial for auditing, troubleshooting or improving a system.
Traces
Traces follow a request’s journey through the system, capturing latency and failures across microservices. Traces are key for understanding dependencies, diagnosing bottlenecks and debugging the source code with real system data.
Tools
Common Open Source Tools to capture these signals are:
- Prometheus is a tool for collecting and querying metrics. It uses a time-series database optimized for real-time data, making it ideal for gathering system health data, enabling alerting, and visualizing trends.
- OpenSearch provides a scalable platform for log indexing, search, and analysis of logs. Enabling teams to sift through large volumes of logs to identify issues and understand system behaviour over time.
- Jaeger is a tool for distributed tracing, providing a detailed view of request paths and performance across services.
- OpenTelemetry was developed as a framework for instrumenting applications and infrastructures to collect metrics, logs and traces. It defines a standard for unifying the processing of all three types of signals. In addition to providing an API and SDKs for multiple programming languages, OpenTelemetry also simplifies the integration with backend systems such as Prometheus, OpenSearch and Jaeger.
Observability in Greenhouse
Greenhouse provides a suite of Plugins, including pre-packaged configurations for monitoring and logging tools. These Plugins are designed to simplify the setup and configuration of observability components. It enables users to quickly deploy monitoring and logging solutions to their Greenhouse clusters.
The following Plugins are currently available:
- Kube-Monitoring: installs Prometheus to collect custom and Kubernetes specific metrics with standard Kubernetes alerting enabled.
- Thanos: installs Thanos to enable long term metric retention and unified metric accessibility.
- Perses: installs Perses an open cloud native dashboard tool for Prometheus and other data sources
- Alerts: installs Prometheus AlertManager and Supernova to manage and visualize alerts sent by Prometheus.
- Logs: installs OpenTelemetry in the form of OpenTelemetryCollectors to collect metrics and logs from applications and forward them to backends like Prometheus and OpenSearch.
- Audit-Logs: installs OpenTelemetry in the form of OpenTelemetryCollectors to collect audit-relevant logs from applications and forward them to backends like Prometheus and OpenSearch.
Overview Architecture
4 - Reference
This section contains reference documentation for Greenhouse.
4.1 - API
Packages:
greenhouse.sap/v1alpha1
Resource Types:Authentication
(Appears on: OrganizationSpec)
| Field | Description |
|---|---|
oidcOIDCConfig | OIDConfig configures the OIDC provider. |
scimSCIMConfig | SCIMConfig configures the SCIM client. |
Catalog
Catalog is the Schema for the catalogs API.
| Field | Description | ||
|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
metadata field. | ||
specCatalogSpec |
| ||
statusCatalogStatus |
CatalogOverrides
(Appears on: CatalogSource)
| Field | Description |
|---|---|
namestring | Name is the name of the PluginDefinition to patch with an alias |
aliasstring | Alias is the alias to apply to the PluginDefinition Name via Kustomize patches For SourceType Helm, this field is passed to postRender Kustomize patch |
repositorystring | Repository is the repository to override in the PluginDefinition .spec.helmChart.repository |
CatalogSource
(Appears on: CatalogSpec)
| Field | Description |
|---|---|
repositorystring | Repository - the Git repository URL |
resources[]string | Resources contains the list of path to PluginDefinition files e.g. [“plugins/plugin-a.yaml”, “plugins/plugin-b.yaml”] glob patterns are supported, e.g. [“plugins/*.yaml”, “more-plugins/**/plugindefinition.yaml”] |
refGitRef | Ref is the git reference (branch, tag, or SHA) to resolve PluginDefinitions from precedence: SHA > Tag > Branch if not specified, defaults to the branch “main” |
secretNamestring | SecretName is the name of v1.Secret containing credentials to access the Git repository the secret must be in the same namespace as the Catalog resource |
overrides[]CatalogOverrides | Overrides are the PluginDefinition overrides to be applied |
intervalKubernetes meta/v1.Duration | Interval defines how often to reconcile the Git repository source |
CatalogSpec
(Appears on: Catalog)
CatalogSpec defines the desired state of Catalog.
| Field | Description |
|---|---|
sources[]CatalogSource | Sources contains the list of Git Repository source to resolve PluginDefinitions / ClusterPluginDefinitions from |
CatalogStatus
(Appears on: Catalog)
CatalogStatus defines the observed state of Catalog.
| Field | Description |
|---|---|
statusConditionsGreenhouse meta/v1alpha1.StatusConditions | StatusConditions contain the different conditions that constitute the status of the Catalog |
inventorymap[string][]../greenhouse/api/v1alpha1.SourceStatus | Inventory contains list of internal artifacts generated by Catalog |
lastReconciledAtstring | LastReconciledAt contains the value when the reconcile was last triggered via annotation. |
Cluster
Cluster is the Schema for the clusters API
| Field | Description | ||||
|---|---|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
metadata field. | ||||
specClusterSpec |
| ||||
statusClusterStatus |
ClusterAccessMode
(string alias)
(Appears on: ClusterSpec)
ClusterAccessMode configures the access mode to the customer cluster.
ClusterConditionType
(string alias)
ClusterConditionType is a valid condition of a cluster.
ClusterKubeConfig
(Appears on: ClusterSpec)
ClusterKubeConfig configures kube config values.
| Field | Description |
|---|---|
maxTokenValidityint32 | MaxTokenValidity specifies the maximum duration for which a token remains valid in hours. |
ClusterKubeconfig
ClusterKubeconfig is the Schema for the clusterkubeconfigs API ObjectMeta.OwnerReferences is used to link the ClusterKubeconfig to the Cluster ObjectMeta.Generation is used to detect changes in the ClusterKubeconfig and sync local kubeconfig files ObjectMeta.Name is designed to be the same with the Cluster name
| Field | Description | ||
|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
metadata field. | ||
specClusterKubeconfigSpec |
| ||
statusClusterKubeconfigStatus |
ClusterKubeconfigAuthInfo
(Appears on: ClusterKubeconfigAuthInfoItem)
| Field | Description |
|---|---|
auth-providerk8s.io/client-go/tools/clientcmd/api.AuthProviderConfig | |
client-certificate-data[]byte | |
client-key-data[]byte |
ClusterKubeconfigAuthInfoItem
(Appears on: ClusterKubeconfigData)
| Field | Description |
|---|---|
namestring | |
userClusterKubeconfigAuthInfo |
ClusterKubeconfigCluster
(Appears on: ClusterKubeconfigClusterItem)
| Field | Description |
|---|---|
serverstring | |
certificate-authority-data[]byte |
ClusterKubeconfigClusterItem
(Appears on: ClusterKubeconfigData)
| Field | Description |
|---|---|
namestring | |
clusterClusterKubeconfigCluster |
ClusterKubeconfigContext
(Appears on: ClusterKubeconfigContextItem)
| Field | Description |
|---|---|
clusterstring | |
userstring | |
namespacestring |
ClusterKubeconfigContextItem
(Appears on: ClusterKubeconfigData)
| Field | Description |
|---|---|
namestring | |
contextClusterKubeconfigContext |
ClusterKubeconfigData
(Appears on: ClusterKubeconfigSpec)
ClusterKubeconfigData stores the kubeconfig data ready to use kubectl or other local tooling It is a simplified version of clientcmdapi.Config: https://pkg.go.dev/k8s.io/client-go/tools/clientcmd/api#Config
| Field | Description |
|---|---|
kindstring | |
apiVersionstring | |
clusters[]ClusterKubeconfigClusterItem | |
users[]ClusterKubeconfigAuthInfoItem | |
contexts[]ClusterKubeconfigContextItem | |
current-contextstring | |
preferencesClusterKubeconfigPreferences |
ClusterKubeconfigPreferences
(Appears on: ClusterKubeconfigData)
ClusterKubeconfigSpec
(Appears on: ClusterKubeconfig)
ClusterKubeconfigSpec stores the kubeconfig data for the cluster The idea is to use kubeconfig data locally with minimum effort (with local tools or plain kubectl): kubectl get cluster-kubeconfig $NAME -o yaml | yq -y .spec.kubeconfig
| Field | Description |
|---|---|
kubeconfigClusterKubeconfigData |
ClusterKubeconfigStatus
(Appears on: ClusterKubeconfig)
| Field | Description |
|---|---|
statusConditionsGreenhouse meta/v1alpha1.StatusConditions |
ClusterOptionOverride
(Appears on: PluginPresetSpec)
ClusterOptionOverride defines which plugin option should be override in which cluster
| Field | Description |
|---|---|
clusterNamestring | |
overrides[]PluginOptionValue |
ClusterPluginDefinition
ClusterPluginDefinition is the Schema for the clusterplugindefinitions API.
| Field | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
metadata field. | ||||||||||||||||||
specPluginDefinitionSpec |
| ||||||||||||||||||
statusClusterPluginDefinitionStatus |
ClusterPluginDefinitionStatus
(Appears on: ClusterPluginDefinition)
ClusterPluginDefinitionStatus defines the observed state of ClusterPluginDefinition.
| Field | Description |
|---|---|
statusConditionsGreenhouse meta/v1alpha1.StatusConditions | StatusConditions contain the different conditions that constitute the status of the Plugin. |
ClusterSpec
(Appears on: Cluster)
ClusterSpec defines the desired state of the Cluster.
| Field | Description |
|---|---|
accessModeClusterAccessMode | AccessMode configures how the cluster is accessed from the Greenhouse operator. |
kubeConfigClusterKubeConfig | KubeConfig contains specific values for |
ClusterStatus
(Appears on: Cluster)
ClusterStatus defines the observed state of Cluster
| Field | Description |
|---|---|
kubernetesVersionstring | KubernetesVersion reflects the detected Kubernetes version of the cluster. |
bearerTokenExpirationTimestampKubernetes meta/v1.Time | BearerTokenExpirationTimestamp reflects the expiration timestamp of the bearer token used to access the cluster. |
statusConditionsGreenhouse meta/v1alpha1.StatusConditions | StatusConditions contain the different conditions that constitute the status of the Cluster. |
nodesNodes | Nodes contain a short summary of nodes count and not ready nodes status. |
GitRef
(Appears on: CatalogSource)
| Field | Description |
|---|---|
branchstring | |
tagstring | |
shastring |
HelmChartReference
(Appears on: PluginDefinitionSpec, PluginStatus)
HelmChartReference references a Helm Chart in a chart repository.
| Field | Description |
|---|---|
namestring | Name of the HelmChart chart. |
repositorystring | Repository of the HelmChart chart. |
versionstring | Version of the HelmChart chart. |
HelmReleaseStatus
(Appears on: PluginStatus)
HelmReleaseStatus reflects the status of a Helm release.
| Field | Description |
|---|---|
statusstring | Status is the status of a HelmChart release. |
firstDeployedKubernetes meta/v1.Time | FirstDeployed is the timestamp of the first deployment of the release. |
lastDeployedKubernetes meta/v1.Time | LastDeployed is the timestamp of the last deployment of the release. |
pluginOptionChecksumstring | PluginOptionChecksum is the checksum of plugin option values. |
diffstring | Diff contains the difference between the deployed helm chart and the helm chart in the last reconciliation |
IgnoreDifference
(Appears on: PluginSpec)
IgnoreDifference defines a set of paths to ignore for matching resources.
| Field | Description |
|---|---|
groupstring | Group matches the APIVersion group of the resources to ignore. |
versionstring | Version matches the APIVersion version of the resources to ignore. |
kindstring | Kind matches the Kind of the resources to ignore. |
namestring | Name matches the name of the resources to ignore. |
paths[]string | Paths is a list of JSON paths to ignore when detecting drifts. |
ManagedPluginStatus
(Appears on: PluginPresetStatus)
ManagedPluginStatus defines the Ready condition of a managed Plugin identified by its name.
| Field | Description |
|---|---|
pluginNamestring | |
readyConditionGreenhouse meta/v1alpha1.Condition |
NodeStatus
(Appears on: Nodes)
NodeStatus represents a status of non-ready node.
| Field | Description |
|---|---|
namestring | Name of the node. |
messagestring | Message represents the error message. |
lastTransitionTimeKubernetes meta/v1.Time | LastTransitionTime represents latest transition time of status. |
Nodes
(Appears on: ClusterStatus)
Nodes contains node count metrics and tracks non-ready nodes in a cluster.
| Field | Description |
|---|---|
totalint32 | Total represent the number of all the nodes in the cluster. |
readyint32 | ReadyNodes represent the number of ready nodes in the cluster. |
notReady[]NodeStatus | NotReady is slice of non-ready nodes status details. |
OIDCConfig
(Appears on: Authentication)
| Field | Description |
|---|---|
issuerstring | Issuer is the URL of the identity service. |
redirectURIstring | RedirectURI is the redirect URI to be used for the OIDC flow against the upstream IdP. If none is specified, the Greenhouse ID proxy will be used. |
clientIDReferenceSecretKeyReference | ClientIDReference references the Kubernetes secret containing the client id. |
clientSecretReferenceSecretKeyReference | ClientSecretReference references the Kubernetes secret containing the client secret. |
oauth2ClientRedirectURIs[]string | OAuth2ClientRedirectURIs are a registered set of redirect URIs. When redirecting from the idproxy to the client application, the URI requested to redirect to must be contained in this list. |
Organization
Organization is the Schema for the organizations API
| Field | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
metadata field. | ||||||||||
specOrganizationSpec |
| ||||||||||
statusOrganizationStatus |
OrganizationSpec
(Appears on: Organization)
OrganizationSpec defines the desired state of Organization
| Field | Description |
|---|---|
displayNamestring | DisplayName is an optional name for the organization to be displayed in the Greenhouse UI. Defaults to a normalized version of metadata.name. |
authenticationAuthentication | Authentication configures the organizations authentication mechanism. |
descriptionstring | Description provides additional details of the organization. |
mappedOrgAdminIdPGroupstring | MappedOrgAdminIDPGroup is the IDP group ID identifying org admins |
configMapRefstring | ConfigMapRef allows to reference organizational config map. |
OrganizationStatus
(Appears on: Organization)
OrganizationStatus defines the observed state of an Organization
| Field | Description |
|---|---|
statusConditionsGreenhouse meta/v1alpha1.StatusConditions | StatusConditions contain the different conditions that constitute the status of the Organization. |
Plugin
Plugin is the Schema for the plugins API
| Field | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
metadata field. | ||||||||||||||||||||
specPluginSpec |
| ||||||||||||||||||||
statusPluginStatus |
PluginDefinition
PluginDefinition is the Schema for the PluginDefinitions API
| Field | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
metadata field. | ||||||||||||||||||
specPluginDefinitionSpec |
| ||||||||||||||||||
statusPluginDefinitionStatus |
PluginDefinitionReference
(Appears on: PluginSpec)
PluginDefinitionReference defines the reference to the PluginDefinition or ClusterPluginDefinition.
| Field | Description |
|---|---|
namestring | Name of the referenced PluginDefinition or ClusterPluginDefinition resource. |
kindstring | Kind of the referent. Supported values: PluginDefinition, ClusterPluginDefinition. |
PluginDefinitionSpec
(Appears on: ClusterPluginDefinition, PluginDefinition)
PluginDefinitionSpec defines the desired state of PluginDefinitionSpec
| Field | Description |
|---|---|
displayNamestring | DisplayName provides a human-readable label for the pluginDefinition. |
descriptionstring | Description provides additional details of the pluginDefinition. |
helmChartHelmChartReference | HelmChart specifies where the Helm Chart for this pluginDefinition can be found. |
uiApplicationUIApplicationReference | UIApplication specifies a reference to a UI application |
options[]PluginOption | RequiredValues is a list of values required to create an instance of this PluginDefinition. |
versionstring | Version of this pluginDefinition |
weightint32 | Weight configures the order in which Plugins are shown in the Greenhouse UI. Defaults to alphabetical sorting if not provided or on conflict. |
iconstring | Icon specifies the icon to be used for this plugin in the Greenhouse UI. Icons can be either: - A string representing a juno icon in camel case from this list: https://github.com/sapcc/juno/blob/main/libs/juno-ui-components/src/components/Icon/Icon.component.js#L6-L52 - A publicly accessible image reference to a .png file. Will be displayed 100x100px |
docMarkDownUrlstring | DocMarkDownUrl specifies the URL to the markdown documentation file for this plugin. Source needs to allow all CORS origins. |
PluginDefinitionStatus
(Appears on: PluginDefinition)
PluginDefinitionStatus defines the observed state of PluginDefinition
| Field | Description |
|---|---|
statusConditionsGreenhouse meta/v1alpha1.StatusConditions | StatusConditions contain the different conditions that constitute the status of the Plugin. |
PluginOption
(Appears on: PluginDefinitionSpec)
| Field | Description |
|---|---|
namestring | Name/Key of the config option. |
defaultKubernetes apiextensions/v1.JSON | (Optional) Default provides a default value for the option |
descriptionstring | Description provides a human-readable text for the value as shown in the UI. |
displayNamestring | DisplayName provides a human-readable label for the configuration option |
requiredbool | Required indicates that this config option is required |
typePluginOptionType | Type of this configuration option. |
regexstring | Regex specifies a match rule for validating configuration options. |
PluginOptionType
(string alias)
(Appears on: PluginOption)
PluginOptionType specifies the type of PluginOption.
PluginOptionValue
(Appears on: ClusterOptionOverride, PluginSpec)
PluginOptionValue is the value for a PluginOption.
| Field | Description |
|---|---|
namestring | Name of the values. |
valueKubernetes apiextensions/v1.JSON | Value is the actual value in plain text. |
valueFromValueFromSource | ValueFrom references a potentially confidential value in another source. |
templatestring | Template is a Go string template that will be dynamically resolved for cluster-specific values. Only PluginOptionValues declared as template will be templated by the PluginController for Flux. |
PluginPreset
PluginPreset is the Schema for the PluginPresets API
| Field | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
metadata field. | ||||||||||
specPluginPresetSpec |
| ||||||||||
statusPluginPresetStatus |
PluginPresetSpec
(Appears on: PluginPreset)
PluginPresetSpec defines the desired state of PluginPreset
| Field | Description |
|---|---|
pluginPluginSpec | PluginSpec is the spec of the plugin to be deployed by the PluginPreset. |
clusterSelectorKubernetes meta/v1.LabelSelector | ClusterSelector is a label selector to select the clusters the plugin bundle should be deployed to. |
clusterOptionOverrides[]ClusterOptionOverride | ClusterOptionOverrides define plugin option values to override by the PluginPreset |
waitFor[]WaitForItem | WaitFor defines other Plugins to wait for before creating the Plugin. |
deletionPolicystring | DeletionPolicy defines how Plugins owned by a PluginPreset are handled on deletion of the PluginPreset. Supported values are “Delete” and “Retain”. If not set, defaults to “Delete”. |
PluginPresetStatus
(Appears on: PluginPreset)
PluginPresetStatus defines the observed state of PluginPreset
| Field | Description |
|---|---|
statusConditionsGreenhouse meta/v1alpha1.StatusConditions | StatusConditions contain the different conditions that constitute the status of the PluginPreset. |
pluginStatuses[]ManagedPluginStatus | PluginStatuses contains statuses of Plugins managed by the PluginPreset. |
totalPluginsint | TotalPlugins is the number of Plugins in total managed by the PluginPreset. |
readyPluginsint | ReadyPlugins is the number of ready Plugins managed by the PluginPreset. |
failedPluginsint | FailedPlugins is the number of failed Plugins managed by the PluginPreset. |
PluginRef
(Appears on: WaitForItem)
PluginRef defines a reference to the Plugin, either by its name or the PluginPreset that it’s created from.
| Field | Description |
|---|---|
namestring | Name of the Plugin. |
pluginPresetstring | PluginPreset is the name of the PluginPreset which creates the Plugin. |
PluginSpec
(Appears on: Plugin, PluginPresetSpec)
PluginSpec defines the desired state of Plugin
| Field | Description |
|---|---|
pluginDefinitionstring | PluginDefinition is the name of the PluginDefinition this instance is for. Deprecated: Use PluginDefinitionRef instead. Future releases of greenhouse will remove this field. |
pluginDefinitionRefPluginDefinitionReference | PluginDefinitionRef is the reference to the (Cluster-)PluginDefinition. |
displayNamestring | DisplayName is an optional name for the Plugin to be displayed in the Greenhouse UI. This is especially helpful to distinguish multiple instances of a PluginDefinition in the same context. Defaults to a normalized version of metadata.name. |
optionValues[]PluginOptionValue | Values are the values for a PluginDefinition instance. |
clusterNamestring | ClusterName is the name of the cluster the plugin is deployed to. If not set, the plugin is deployed to the greenhouse cluster. |
releaseNamespacestring | ReleaseNamespace is the namespace in the remote cluster to which the backend is deployed. Defaults to the Greenhouse managed namespace if not set. |
releaseNamestring | ReleaseName is the name of the helm release in the remote cluster to which the backend is deployed. If the Plugin was already deployed, the Plugin’s name is used as the release name. If this Plugin is newly created, the releaseName is defaulted to the PluginDefinitions HelmChart name. |
deletionPolicystring | DeletionPolicy defines how Helm Releases created by a Plugin are handled upon deletion of the Plugin. Supported values are “Delete” and “Retain”. If not set, defaults to “Delete”. |
waitFor[]WaitForItem | WaitFor defines other Plugins to wait for before installing this Plugin. |
ignoreDifferences[]IgnoreDifference | IgnoreDifferences defines paths to ignore when detecting drift between desired and actual state. |
PluginStatus
(Appears on: Plugin)
PluginStatus defines the observed state of Plugin
| Field | Description |
|---|---|
helmReleaseStatusHelmReleaseStatus | HelmReleaseStatus reflects the status of the latest HelmChart release. This is only configured if the pluginDefinition is backed by HelmChart. |
versionstring | Version contains the latest pluginDefinition version the config was last applied with successfully. |
helmChartHelmChartReference | HelmChart contains a reference the helm chart used for the deployed pluginDefinition version. |
uiApplicationUIApplicationReference | UIApplication contains a reference to the frontend that is used for the deployed pluginDefinition version. |
weightint32 | Weight configures the order in which Plugins are shown in the Greenhouse UI. |
descriptionstring | Description provides additional details of the plugin. |
exposedServicesmap[string]../greenhouse/api/v1alpha1.Service | ExposedServices provides an overview of the Plugins services that are centrally exposed. It maps the exposed URL to the service found in the manifest. |
statusConditionsGreenhouse meta/v1alpha1.StatusConditions | StatusConditions contain the different conditions that constitute the status of the Plugin. |
lastReconciledAtstring | LastReconciledAt contains the value when the reconcile was last triggered via annotation. |
PropagationStatus
(Appears on: TeamRoleBindingStatus)
PropagationStatus defines the observed state of the TeamRoleBinding’s associated rbacv1 resources on a Cluster
| Field | Description |
|---|---|
clusterNamestring | ClusterName is the name of the cluster the rbacv1 resources are created on. |
conditionGreenhouse meta/v1alpha1.Condition | Condition is the overall Status of the rbacv1 resources created on the cluster |
SCIMConfig
(Appears on: Authentication)
| Field | Description |
|---|---|
baseURLstring | URL to the SCIM server. |
authTypegithub.com/cloudoperators/greenhouse/internal/scim.AuthType | AuthType defined possible authentication type |
basicAuthUserValueFromSource | User to be used for basic authentication. |
basicAuthPwValueFromSource | Password to be used for basic authentication. |
bearerTokenValueFromSource | BearerToken to be used for bearer token authorization |
bearerPrefixstring | BearerPrefix to be used to defined bearer token prefix |
bearerHeaderstring | BearerHeader to be used to defined bearer token header |
SecretKeyReference
(Appears on: OIDCConfig, ValueFromSource)
SecretKeyReference specifies the secret and key containing the value.
| Field | Description |
|---|---|
namestring | Name of the secret in the same namespace. |
keystring | Key in the secret to select the value from. |
Service
(Appears on: PluginStatus)
Service references a Kubernetes service of a Plugin.
| Field | Description |
|---|---|
namespacestring | Namespace is the namespace of the service in the target cluster. |
namestring | Name is the name of the service in the target cluster. |
portint32 | Port is the port of the service. Zero for ingresses where port is not applicable. |
protocolstring | Protocol is the protocol of the service. |
typeServiceType | Type is the type of exposed service. |
ServiceType
(string alias)
(Appears on: Service)
ServiceType defines the type of exposed service.
SourceStatus
| Field | Description |
|---|---|
kindstring | |
namestring | |
readyKubernetes meta/v1.ConditionStatus | |
messagestring |
Team
Team is the Schema for the teams API
| Field | Description | ||||||
|---|---|---|---|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
metadata field. | ||||||
specTeamSpec |
| ||||||
statusTeamStatus |
TeamRole
TeamRole is the Schema for the TeamRoles API
| Field | Description | ||||||
|---|---|---|---|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
metadata field. | ||||||
specTeamRoleSpec |
| ||||||
statusTeamRoleStatus |
TeamRoleBinding
TeamRoleBinding is the Schema for the rolebindings API
| Field | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
metadata field. | ||||||||||||||
specTeamRoleBindingSpec |
| ||||||||||||||
statusTeamRoleBindingStatus |
TeamRoleBindingSpec
(Appears on: TeamRoleBinding)
TeamRoleBindingSpec defines the desired state of a TeamRoleBinding
| Field | Description |
|---|---|
teamRoleRefstring | TeamRoleRef references a Greenhouse TeamRole by name |
teamRefstring | TeamRef references a Greenhouse Team by name |
usernames[]string | Usernames defines list of users to add to the (Cluster-)RoleBindings |
clusterNamestring | ClusterName is the name of the cluster the rbacv1 resources are created on. |
clusterSelectorKubernetes meta/v1.LabelSelector | ClusterSelector is a label selector to select the Clusters the TeamRoleBinding should be deployed to. |
namespaces[]string | Namespaces is a list of namespaces in the Greenhouse Clusters to apply the RoleBinding to. If empty, a ClusterRoleBinding will be created on the remote cluster, otherwise a RoleBinding per namespace. |
createNamespacesbool | CreateNamespaces when enabled the controller will create namespaces for RoleBindings if they do not exist. |
TeamRoleBindingStatus
(Appears on: TeamRoleBinding)
TeamRoleBindingStatus defines the observed state of the TeamRoleBinding
| Field | Description |
|---|---|
statusConditionsGreenhouse meta/v1alpha1.StatusConditions | StatusConditions contain the different conditions that constitute the status of the TeamRoleBinding. |
clusters[]PropagationStatus | PropagationStatus is the list of clusters the TeamRoleBinding is applied to |
TeamRoleSpec
(Appears on: TeamRole)
TeamRoleSpec defines the desired state of a TeamRole
| Field | Description |
|---|---|
rules[]Kubernetes rbac/v1.PolicyRule | Rules is a list of rbacv1.PolicyRules used on a managed RBAC (Cluster)Role |
aggregationRuleKubernetes rbac/v1.AggregationRule | AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole on the remote cluster |
labelsmap[string]string | Labels are applied to the ClusterRole created on the remote cluster. This allows using TeamRoles as part of AggregationRules by other TeamRoles |
TeamRoleStatus
(Appears on: TeamRole)
TeamRoleStatus defines the observed state of a TeamRole
TeamSpec
(Appears on: Team)
TeamSpec defines the desired state of Team
| Field | Description |
|---|---|
descriptionstring | Description provides additional details of the team. |
mappedIdPGroupstring | IdP group id matching team. |
joinUrlstring | URL to join the IdP group. |
TeamStatus
(Appears on: Team)
TeamStatus defines the observed state of Team
| Field | Description |
|---|---|
statusConditionsGreenhouse meta/v1alpha1.StatusConditions | |
members[]User |
UIApplicationReference
(Appears on: PluginDefinitionSpec, PluginStatus)
UIApplicationReference references the UI pluginDefinition to use.
| Field | Description |
|---|---|
urlstring | URL specifies the url to a built javascript asset. By default, assets are loaded from the Juno asset server using the provided name and version. |
namestring | Name of the UI application. |
versionstring | Version of the frontend application. |
User
(Appears on: TeamStatus)
User specifies a human person.
| Field | Description |
|---|---|
idstring | ID is the unique identifier of the user. |
firstNamestring | FirstName of the user. |
lastNamestring | LastName of the user. |
emailstring | Email of the user. |
ValueFromSource
(Appears on: PluginOptionValue, SCIMConfig)
ValueFromSource is a valid source for a value.
| Field | Description |
|---|---|
secretSecretKeyReference | Secret references the secret containing the value. |
WaitForItem
(Appears on: PluginPresetSpec, PluginSpec)
WaitForItem is a wrapper around PluginRef to add context for every WaitFor list item.
| Field | Description |
|---|---|
pluginRefPluginRef | PluginRef defines a reference to the Plugin. |
greenhouse.sap/v1alpha2
Resource Types:ClusterSelector
(Appears on: TeamRoleBindingSpec)
ClusterSelector specifies a selector for clusters by name or by label
| Field | Description |
|---|---|
clusterNamestring | Name of a single Cluster to select. |
labelSelectorKubernetes meta/v1.LabelSelector | LabelSelector is a label query over a set of Clusters. |
PropagationStatus
(Appears on: TeamRoleBindingStatus)
PropagationStatus defines the observed state of the TeamRoleBinding’s associated rbacv1 resources on a Cluster
| Field | Description |
|---|---|
clusterNamestring | ClusterName is the name of the cluster the rbacv1 resources are created on. |
conditionGreenhouse meta/v1alpha1.Condition | Condition is the overall Status of the rbacv1 resources created on the cluster |
TeamRoleBinding
TeamRoleBinding is the Schema for the rolebindings API
| Field | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
metadata field. | ||||||||||||
specTeamRoleBindingSpec |
| ||||||||||||
statusTeamRoleBindingStatus |
TeamRoleBindingSpec
(Appears on: TeamRoleBinding)
TeamRoleBindingSpec defines the desired state of a TeamRoleBinding
| Field | Description |
|---|---|
teamRoleRefstring | TeamRoleRef references a Greenhouse TeamRole by name |
teamRefstring | TeamRef references a Greenhouse Team by name |
usernames[]string | Usernames defines list of users to add to the (Cluster-)RoleBindings |
clusterSelectorClusterSelector | ClusterSelector is used to select a Cluster or Clusters the TeamRoleBinding should be deployed to. |
namespaces[]string | Namespaces is a list of namespaces in the Greenhouse Clusters to apply the RoleBinding to. If empty, a ClusterRoleBinding will be created on the remote cluster, otherwise a RoleBinding per namespace. |
createNamespacesbool | CreateNamespaces when enabled the controller will create namespaces for RoleBindings if they do not exist. |
TeamRoleBindingStatus
(Appears on: TeamRoleBinding)
TeamRoleBindingStatus defines the observed state of the TeamRoleBinding
| Field | Description |
|---|---|
statusConditionsGreenhouse meta/v1alpha1.StatusConditions | StatusConditions contain the different conditions that constitute the status of the TeamRoleBinding. |
clusters[]PropagationStatus | PropagationStatus is the list of clusters the TeamRoleBinding is applied to |
This page was automatically generated with gen-crd-api-reference-docs
4.2 - Greenhouse API
4.2.1 - Organizations
An Organization is the top-level entity within Greenhouse. Each Organization represents a different tenant within Greenhouse and is provided with a dedicated Namespace in the Greenhouse cluster.
Example Organization Spec
apiVersion: greenhouse.sap/v1alpha1
kind: Organization
metadata:
name: example-organization
spec:
authentication:
oidc:
issuer: https://accounts.example.com
clientId: example-client-id
Writing an Organization Spec
DisplayName
.spec.displayName is a human-friendly name for the Organization. This field is optional; if not provided, it defaults to the value of metadata.name.
Authentication
OIDC
.spec.authentication.oidc is used to configure how members of the Organization will authenticate to Greenhouse. Greenhouse IDProxy is using Dex to provide the OIDC authentication for multiple Organizations. Each Organization receives their own Dex connector.
The config requires issuer, the URL of the identity provider, and clientIDReference and clientSecretReference, which reference Kubernetes Secrets containing the OIDC client ID and client secret, respectively.
spec:
authentication:
oidc:
issuer: https://accounts.example.com
clientIdReference:
name: oidc-client-id-secret
key: client-id
clientSecretReference:
name: oidc-client-secret
key: client-secret
.authentication.oidc.redirectURI is an optional field to specify a custom redirect URI for OIDC authentication. If not provided, it defaults to the Greenhouse ID Proxy (auth.<greenhouse domain name>).
.authentication.oidc.oauth2ClientRedirectURIs is an optional list of URIs that are added to the Dex connector as allowed redirect URIs for OAuth2 clients.
SCIM
.spec.authentication.scim is used by Greenhouse to retrieve the members of a Team from the Organization’s identity provider. This field is optional; if not provided, Greenhouse will not attempt to sync users via SCIM.
The configuration requires baseURL, the URL of the SCIM endpoint, and authType, which specifies the authentication method to use when connecting to the SCIM endpoint. Supported methods are basic and token.
spec:
authentication:
scim:
baseURL: https://scim.example.com
authType: token
bearerToken:
secret:
name: scim-bearer-token-secret
key: bearer-token
bearerPrefix: Bearer
bearerHeader: Authorization
.authentication.scim.bearerPrefix is an optional field to specify a custom prefix for the bearer token in the authorization header. If not provided, it defaults to Bearer.
.authentication.scim.bearerHeader is an optional field to specify a custom header name for the bearer token. If not provided, it defaults to Authorization.
MappedOrgAdminIdPGroup
.spec.mappedOrgAdminIdPGroup is an optional field that specifies the name of an identity provider group whose members will be granted Organization Admin privileges within Greenhouse. If this field is not provided, no users will be granted Organization Admin privileges.
Working with Organizations
Role-Based Access Control within the Organization namespace
Greenhouse provisions a set of default Roles and RoleBindings within each Organization’s Namespace to facilitate Role-Based Access Control (RBAC). These roles can be used by the Organization Admins as a starting point to manage access to resources within their Organization.
The following roles are seeded for each Organization:
| Name | Description | ApiGroups | Resources | Verbs | Cluster scoped |
|---|---|---|---|---|---|
role:<org-name>:admin | An admin of a Greenhouse Organization. This entails the permissions of role:<org-name>:cluster-admin and role:<org-name>:plugin-admin | greenhouse.sap/v1alpha1 | * | * | - |
v1 | secrets | * | - | ||
"" | pods, replicasets, deployments, statefulsets, daemonsets, cronjobs, jobs, configmaps | get, list, watch | - | ||
monitoring.coreos.com | alertmanagers, alertmanagerconfigs | get, list, watch | - | ||
role:<org-name>:cluster-admin | An admin of Greenhouse Clusters within an Organization | greenhouse.sap/v1alpha1 | clusters, teamrolebindings | * | - |
v1 | secrets | create, update, patch | - | ||
role:<org-name>:plugin-admin | An admin of Greenhouse Plugins within an Organization | greenhouse.sap/v1alpha1 | plugins, pluginpresets, catalogs, plugindefinitions | * | - |
v1 | secrets | create, update, patch | - | ||
organization:<org-name> | A member of a Greenhouse Organization | greenhouse.sap/v1alpha1 | * | get, list, watch | - |
organization:<org-name> | A member of a Greenhouse Organization | greenhouse.sap/v1alpha1 | organizations, clusterplugindefinitions | get, list, watch | x |
Next Steps
4.2.2 - PluginDefinitions
A PluginDefinition brings either a UI application, a Helm chart deployment, or both, to the Greenhouse platform. The Helm chart for a PluginDefinition can be used to deploy infrastructure components to a Kubernetes cluster managed with Greenhouse. The PluginDefinition provides an opinionated way to configure, integrate and deploy these components with Greenhouse.
Example PluginDefinition Spec
apiVersion: greenhouse.sap/v1alpha1
kind: PluginDefinition
metadata:
name: alerts
namespace: example-organization
spec:
description: The Alerts Plugin consists of both Prometheus Alertmanager and Supernova,
the holistic alert management UI
displayName: Alerts
docMarkDownUrl: https://raw.githubusercontent.com/cloudoperators/greenhouse-extensions/main/alerts/README.md
helmChart:
name: alerts
repository: oci://ghcr.io/cloudoperators/greenhouse-extensions/charts
version: 4.0.3
icon: https://raw.githubusercontent.com/cloudoperators/greenhouse-extensions/main/alerts/logo.png
uiApplication:
name: supernova
version: latest
version: 5.0.3
weight: 0
Writing a PluginDefinition Spec
.spec.displayName is a human-readable name for the PluginDefinition. This field is optional; if not provided, it defaults to the value of metadata.name. This name is used in the Greenhouse UI to display the PluginDefinition in the Catalog of available PluginDefinitions.
.spec.version specifies the semantic version of the PluginDefinition. This versions the combination of Helm chart, UI application and any options provided in the PluginDefinition. The version should be incremented whenever any of these fields are updated.
.spec.uiApplication is an optional field that specifies the UI application associated with the PluginDefinition. The UI application will be made available in the Greenhouse UI when a Plugin is created from this PluginDefinition.
spec:
uiApplication:
name: supernova
version: latest
weight: 0
icon: https://raw.githubusercontent.com/cloudoperators/greenhouse-extensions/main/alerts/logo.png
docMarkDownUrl: https://raw.githubusercontent.com/cloudoperators/greenhouse-extensions/main/alerts/README.md
The fields weight and icon are optional and are used to customize the appearance of the Plugin in the Greenhouse UI sidebar. The optional field docMarkDownUrl can be used to provide a link to documentation for the PluginDefinition, which will be displayed in the entry of available PluginDefinitions in the Greenhouse UI.
.spec.helmChart is an optional field that specifies the Helm chart that is deployed when creating a Plugin from this PluginDefinition.
spec:
helmChart:
name: alerts
repository: oci://ghcr.io/cloudoperators/greenhouse-extensions/charts
version: 4.0.3
.spec.options is an optional field that specifies default configuration options for the PluginDefinition. These options will be pre-filled when creating a Plugin from this PluginDefinition, but can be overridden by the user.
spec:
options:
- description: Alertmanager API Endpoint URL
name: endpoint
required: true
type: string
- description: FilterLabels are the labels shown in the filter dropdown, enabling
users to filter alerts based on specific criteria. The format is a list of strings.
name: filterLabels
required: false
type: list
- default: false
description: Install Prometheus Operator CRDs if kube-monitoring has not already
installed them.
name: alerts.crds.enabled
required: false
type: bool
.required indicates whether the option is mandatory when creating a Plugin from this PluginDefinition. .default contains the default value for the option if the Plugin does not provide a value for it. .type is used to enforce validation of the value. The following types are supported: string, bool, int, list, map and secret.
| ℹ️ The type secret requires a secret reference, disallowing clear-text credentials. Vault/OpenBao references will be allowed with 1211|
Next Steps
4.2.3 - PluginPresets
A PluginPreset is used to configure Plugins for a set of Clusters. This allows administrators to define standard configurations for Clusters in the same environment or with similar requirements. Greenhouse will create Plugins based on the PluginPreset for each Cluster that matches the specified selector.
Example PluginPreset Spec
apiVersion: greenhouse.sap/v1alpha1
kind: PluginPreset
metadata:
name: perses-preset
namespace: example-organization
spec:
clusterOptionOverrides:
- clusterName: example-cluster
overrides:
- name: perses.serviceMonitor.selfMonitor
value: true
- name: perses.serviceMonitor.labels
value:
plugin: kube-monitoring
clusterSelector:
matchExpressions:
- key: cluster-type
operator: In
values:
- observability
deletionPolicy: Delete
plugin:
optionValues:
- name: perses.sidecar.enabled
value: true
pluginDefinitionRef:
kind: ClusterPluginDefinition
name: perses
releaseName: perses
releaseNamespace: kube-monitoring
Writing a PluginPreset Spec
.spec.plugin is the template for the Plugins that will be created for each matching Cluster. This field has the same structure as the PluginSpec. Only .spec.clusterName is not allowed in the PluginPreset’s Plugin template, as the Cluster name is determined by the matching Clusters.
spec:
plugin:
optionValues:
- name: perses.sidecar.enabled
value: true
pluginDefinitionRef:
kind: ClusterPluginDefinition
name: perses
releaseName: perses
releaseNamespace: kube-monitoring
.spec.clusterSelector is a required field that specifies the label selector used to list the Clusters for which Plugins will be created based on this PluginPreset.
spec:
clusterSelector:
matchExpressions:
- key: cluster-type
operator: In
values:
- observability
| ⚠️ Changing the clusterSelector may result in the creation or deletion of Plugins for Clusters that start or stop matching the selector. |
.spec.clusterOptionOverrides is an optional field that can be used to provide per-Cluster overrides for the Plugin’s OptionValues. This can be used to customize the configuration of the Plugin for specific Clusters.
spec:
clusterOptionOverrides:
- clusterName: example-cluster
overrides:
- name: perses.serviceMonitor.selfMonitor
value: true
.spec.deletionPolicy is an optional field that specifies the behaviour when a PluginPreset is deleted. The possible values are Delete and Retain. If set to Delete (the default), all Plugins created by the PluginPreset will also be deleted when the PluginPreset is deleted. If set to Retain, the Plugins will remain after the PluginPreset is deleted or if the Cluster stops matching the selector.
Next Steps
4.2.4 - Plugins
A Plugin is an instance of a PluginDefinition and is used to deploy infrastructure components such as observability, compliance or system components to a Kubernetes cluster managed with Greenhouse. A Plugin provides the specific configuration for deploying the Helm chart associated with the referenced PluginDefinition to a specific cluster.
Example Plugin Spec
apiVersion: greenhouse.sap/v1alpha1
kind: Plugin
metadata:
name: alerts-plugin
namespace: example-organization
spec:
clusterName: example-cluster
displayName: Example Alerts Plugin
optionValues:
- name: image.tag
value: foobar
pluginDefinitionRef:
kind: PluginDefinition
name: alerts
releaseName: alerts
releaseNamespace: kube-monitoring
Writing a Plugin Spec
.spec.displayName is an optional human-readable name that is used to display the Plugin in the Greenhouse UI. If not provided, it defaults to the value of metadata.name.
.spec.clusterName is the name of the Cluster resource where the Helm chart associated with the PluginDefinition will be deployed.
.spec.pluginDefinitionRef is the required and immutable reference to a PluginDefinition resource that defines the Helm chart and UI application associated with this Plugin.
spec:
pluginDefinitionRef:
kind: PluginDefinition
name: alerts
.spec.releaseName is the optional and immutable name of the Helm release that will be created when deploying the Plugin to the target cluster. If not provided it defaults to the name of the PluginDefinition’s Helm chart.
.spec.releaseNamespace is the optional and immutable Kubernetes namespace in the target cluster where the Helm release will be deployed. If not provided, it defaults to the name of the Organization.
.spec.optionValues is an optional list of Helm chart values that will be used to customize the deployment of the Helm chart associated with the PluginDefinition. These values are used to set Options required by the PluginDefinition or to override provided default values.
optionValues:
- name: image.tag
value: foobar
- name: secret
valueFrom:
secret:
name: alerts-secret
key: secret-key
| ℹ️ A defaulting webhook automatically merges the OptionValues with the defaults set in the PluginDefinition. The defaulting does not update OptionValues when the defaults change and does not remove values when they are removed from the PluginDefinition. |
.spec.waitFor is an optional field that specifies PluginPresets or Plugins which have to be successfully deployed before this Plugin can be deployed. This can be used to express dependencies between Plugins. This can be useful if one Plugin depends on Custom Resource Definitions or other resources created by another Plugin.
spec:
waitFor:
- pluginRef:
pluginPreset: ingress-nginx
- pluginRef:
name: cert-manager-example-cluster
| ℹ️ The dependency on a PluginPreset ensures that a Plugin created by this PluginPreset has been deployed to the same cluster. The dependency on a Plugin is fulfilled if the referenced Plugin is deployed to the same cluster. |
.spec.ignoreDifferences is an optional field that is used to suppress specific differences detected by the drift detection of the deployment tool. This can be useful to ignore differences in fields that are managed by other controllers or tools. Example configuration when using Flux as the deployment tool.
spec:
ignoreDifferences:
- group: apps
version: v1
kind: Deployment
paths:
- /spec/replicas
| ⚠️ The ignoreDifferences field is only supported when using Flux as the deployment tool. It is ignored when using the legacy Helm controller. |
Working with Plugins
Choosing the deployment tool
The annotation greenhouse.sap/deployment-tool can be added to a Plugin resource to choose the deployment tool used to deploy the Helm release. Supported values are flux and legacy.
Suspending the Plugin’s reconciliation
The annotation greenhouse.sap/suspend can be added to a Plugin resource to temporarily suspend the reconciliation of the Plugin. This results in no changes on the Plugin or referenced resources being applied until the annotation is removed. This also includes upgrades of the Helm release on the target cluster. This also blocks the deletion of the Plugin resource until the annotation is removed.
Triggering reconciliation of the Plugin’s managed resources
The annotation greenhouse.sap/reconcile can be added to a Plugin resource to trigger a reconciliation of the Plugin and its managed resources. When the Plugin is deployed using FluxCD this annotation is propagated to the Flux HelmRelease resource and triggers a reconciliation of the Helm release on the target cluster. This can be useful to trigger a reconciliation even if no changes were made to the Plugin resource.
Next Steps
4.2.5 - Catalogs
A Catalog is a collection of PluginDefinitions that can be made available to Organizations within Greenhouse. Catalogs allow organization admins to manage the lifecycle of PluginDefinitions by controlling which version of a PluginDefinition is deployed to their cluster fleet.
The Catalog API is currently in alpha and is still under active development and is subjected to change.
Example
The following is an example of a Greenhouse Catalog that reconciles the PluginDefinition manifests stored in a Git Repository.
apiVersion: greenhouse.sap/v1alpha1
kind: Catalog
metadata:
name: greenhouse-extensions
namespace: <organization-namespace>
spec:
sources:
- repository: https://github.com/cloudoperators/greenhouse-extensions
resources:
- alerts/plugindefinition.yaml
- audit-logs/plugindefinition.yaml
- cert-manager/plugindefinition.yaml
- external-dns/plugindefinition.yaml
- repo-guard/plugindefinition.yaml
- ingress-nginx/plugindefinition.yaml
- kube-monitoring/plugindefinition.yaml
- logs/plugindefinition.yaml
- perses/plugindefinition.yaml
- thanos/plugindefinition.yaml
ref:
branch: main
In the above example:
- The Greenhouse Catalog references a Git Repository targeting the
mainbranch. - The Catalog is configured to target specific
PluginDefinitionmanifests stored in a path within the repository specified under.spec.sources[].resources[]. - The Catalog watches for changes in the specified Git Repository branch and reconciles the
PluginDefinitionsin the Organization namespace accordingly.
Writing a Catalog Spec
Sources
.spec.sources is a list of sources from which the Catalog will fetch PluginDefinition manifests. Currently, only Git repositories are supported as sources.
Each source requires a repository URL and a list of resources that specify the paths to the PluginDefinition manifests within the repository.
The ref field is used to specify the branch, tag, or commit SHA to fetch from the repository.
⚠️ Each Organization has a dedicated ServiceAccount used to apply the Catalog resources. This ServiceAccount only has permissions to apply PluginDefinitions into the Organization’s Namespace. It will not be possible to bring other Kinds using the Catalog.
Repository
.spec.sources[].repository is used to specify the URL of the Git repository containing the PluginDefinition manifests.
Resources
.spec.sources[].resources is a list of file paths within the repository that point to the PluginDefinition manifests to be included in the Catalog.
Empty resources list will result in an error.
Ref
.spec.sources[].ref is used to specify the branch, tag, or commit SHA to fetch from the repository.
Available fields are:
- sha - The commit SHA to fetch.
- tag - The tag to fetch.
- branch - The branch that is targeted.
The priority order is: sha > tag > branch. If multiple fields are specified, the field with the highest priority will be used.
When multiple sources are defined with the same repository and ref, a duplicate error will be raised.
Interval (Optional)
.spec.sources[].interval is an optional field that specifies how often the Catalog should check for updates in the source repository.
The default value is 1h (1 hour) if not specified.
The value must be in a Go recognized duration format, e.g. 5m0s to reconcile the source every 5 minutes.
Secret Reference (Optional)
.spec.sources[].secretName is an optional field that specifies a reference to a Kubernetes Secret name containing credentials for accessing private Git repositories.
The following are the types of authentication supported:
The Secret must be in the same namespace as the Catalog resource.
Overrides (Optional)
.spec.sources[].overrides is an optional field that allows specifying overrides for specific PluginDefinitions in the Catalog.
This can be used to customize certain fields of PluginDefinitions.
Currently, you can override the following fields:
aliasfield to overridemetadata.nameof the PluginDefinitionrepositoryfield to override the helm chart repository in the PluginDefinition spec
Working with Catalog
Configuring Secret for Basic Authentication:
To authenticate towards a Git repository over HTTPS using basic access authentication (in other words: using a username and password),
the referenced Secret is expected to contain .data.username and .data.password values.
apiVersion: v1
kind: Secret
metadata:
name: git-credentials
namespace: <catalog-namespace>
type: Opaque
data:
username: <BASE64>
password: <BASE64>
password is the Personal Access Token (PAT) for accessing the Git repository.
Configure Secret for GitHub App authentication:
Pre-requisites:
Register the GitHub App with the necessary permissions and generate a private key for the app.
Install the app in the organization/account configuring access to the necessary repositories.
To authenticate towards a GitHub repository using a GitHub App, the referenced secret is expected to contain the following values:
- Get the App ID from the app settings page at
https://github.com/settings/apps/<app-name>. - Get the App Installation ID from the app installations page at
https://github.com/settings/installations. Click the installed app, the URL will contain the installation IDhttps://github.com/settings/installations/<installation-id>. For organizations, the first part of the URL may be different, but it follows the same pattern. - The private key that was generated in the pre-requisites.
- (Optional) GitHub Enterprise Server users can set the base URL to http(s)://HOSTNAME/api/v3.
- (Optional) If GitHub Enterprise Server uses a private CA, include its bundle (root and any intermediates) in
ca.crt. If theca.crtis specified, then it will be used for TLS verification for all API / Git over HTTPS requests to the GitHub Enterprise Server.
apiVersion: v1
kind: Secret
metadata:
name: github-app-credentials
namespace: <catalog-namespace>
type: Opaque
stringData:
githubAppID: "5001"
githubAppInstallationID: "1005"
githubAppBaseURL: "github.enterprise.example.com/api/v3" #optional, required only for GitHub Enterprise Server users
githubAppPrivateKey: |
-----BEGIN RSA PRIVATE KEY-----
.....
-----END RSA PRIVATE KEY-----
ca.crt: | #optional, for GitHub Enterprise Server users
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
Minimum required permissions for the GitHub App or Personal Access Token (PAT) is content read access for the target repository.
Configuring Overrides for PluginDefinitions
If you want to bring in multiple versions of the same PluginDefinition, you can use the alias option to reference the PluginDefinition under a different name.
Example:
spec:
sources:
- repository: https://github.com/cloudoperators/greenhouse-extensions
resources:
- perses/plugindefinition.yaml
ref:
branch: main
overrides:
- name: perses
alias: perses-latest
- repository: https://github.com/cloudoperators/greenhouse-extensions
resources:
- perses/plugindefinition.yaml
ref:
sha: <commit-sha>
overrides:
- name: perses
alias: perses-stable
overrides[].namemust match themetadata.nameof the PluginDefinition being overridden.
Each PluginDefinition has a helm chart reference in its spec. If you want to override the helm chart repository,
you can do that in overrides
Example:
spec:
sources:
- repository: https://github.com/cloudoperators/greenhouse-extensions
resources:
- perses/plugindefinition.yaml
ref:
branch: main
overrides:
- name: perses
repository: oci://your-registry.io/some-repo/perses-chart
Suspending the Catalog’s reconciliation
The annotation greenhouse.sap/suspend can be added to a Catalog resource to temporarily suspend reconciliation.
When this annotation is present, the Catalog controller will set it’s underlying Flux resources to suspended state.
Any changes made to the Catalog .spec will be ignored while the annotation is present.
To resume reconciliation, simply remove the annotation from the Catalog resource.
The annotation also blocks the deletion of the Catalog resource until the annotation is removed.
Triggering reconciliation of the Catalog’s managed resources
The Catalog resource orchestrates a combination of Flux resources to fetch and apply PluginDefinitions.
The Flux resources managed by Catalog have their own reconciliation intervals.
To trigger an immediate reconciliation of the Catalog and its managed resources, the annotation greenhouse.sap/reconcile can be set.
This can be useful to trigger an immediate reconciliation when the source repository has changed, and you want to apply
the changes without waiting for the next scheduled reconciliation.
Troubleshooting
Greenhouse uses FluxCD under the hood to reconcile Catalog sources and for each source a map of grouped status inventory is shown.
Run kubectl get cat -n <organization-namespace> to see the reconciliation status.
NAMESPACE NAME READY
greenhouse greenhouse-extensions True
Run kubectl describe cat greenhouse-extenions -n greenhouse to see the reconciliation status conditions
Status:
Inventory:
github-com-cloudoperators-greenhouse-extensions-main-9689366613293914683:
Kind: GitRepository
Message: stored artifact for revision 'main@sha1:50cbc65c8e8ea390cb947f2a53e8f3dd33265417'
Name: repository-9689366613293914683
Ready: True
Kind: ArtifactGenerator
Message: reconciliation succeeded, generated 1 artifact(s)
Name: generator-9689366613293914683
Ready: True
Kind: ExternalArtifact
Message: Artifact is ready
Name: artifact-9689366613293914683
Ready: True
Kind: Kustomization
Message: Applied revision: latest@sha256:a6114ad3b1c591f1585d78818320d603e78d29b04f527c88321027c59372d506
Name: kustomize-9689366613293914683
Ready: True
Status Conditions:
Conditions:
Last Transition Time: 2025-10-31T00:14:59Z
Message: all catalog objects are ready
Reason: CatalogReady
Status: True
Type: Ready
Run kubectl get gitrepository repository-9689366613293914683 -n greenhouse to see the GitRepository status
NAME URL AGE READY STATUS
repository-9689366613293914683 https://github.com/cloudoperators/greenhouse-extensions 7d10h True stored artifact for revision 'main@sha1:50cbc65c8e8ea390cb947f2a53e8f3dd33265417'
Run kubectl describe gitrepository repository-9689366613293914683 -n greenhouse to see the reconciliation status conditions of the GitRepository
...
Spec:
Interval: 60m0s
Provider: generic
Ref:
Branch: main
Timeout: 60s
URL: https://github.com/cloudoperators/greenhouse-extensions
Status:
Artifact:
Digest: sha256:b2662d5c547a7b499c2030e9f646d292413e9745f1a8be9759a212375bc93b42
Last Update Time: 2025-10-30T12:12:00Z
Path: gitrepository/greenhouse/repository-9689366613293914683/50cbc65c8e8ea390cb947f2a53e8f3dd33265417.tar.gz
Revision: main@sha1:50cbc65c8e8ea390cb947f2a53e8f3dd33265417
Size: 7668967
URL: http://source-controller.flux-system.svc.cluster.local./gitrepository/greenhouse/repository-9689366613293914683/50cbc65c8e8ea390cb947f2a53e8f3dd33265417.tar.gz
Conditions:
Last Transition Time: 2025-10-30T12:12:00Z
Message: stored artifact for revision 'main@sha1:50cbc65c8e8ea390cb947f2a53e8f3dd33265417'
Observed Generation: 2
Reason: Succeeded
Status: True
Type: Ready
Last Transition Time: 2025-10-30T12:12:00Z
Message: stored artifact for revision 'main@sha1:50cbc65c8e8ea390cb947f2a53e8f3dd33265417'
Observed Generation: 2
Reason: Succeeded
Status: True
Type: ArtifactInStorage
Observed Generation: 2
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal GitOperationSucceeded 4m40s (x51 over 12h) source-controller no changes since last reconcilation: observed revision 'main@sha1:50cbc65c8e8ea390cb947f2a53e8f3dd33265417'
In case of authentication failures due to invalid credentials, you will see errors in the GitRepository status conditions. (The same error message and ready status will also be reflected in the Catalog .status.inventory for the respective source.)
- message: >-
failed to checkout and determine revision: unable to list remote for
'https://github.com/cloudoperators/greenhouse-extensions': authentication
required: Invalid username or token.
observedGeneration: 3
reason: GitOperationFailed
status: "False"
type: Ready
PluginDefinitions referenced in .spec.sources[].resources are accumulated using Flux ArtifactGenerator. Run kubectl get artifactgenerator generator-9689366613293914683 -n greenhouse to see the status.
NAME AGE READY STATUS
generator-9689366613293914683 7d11h True reconciliation succeeded, generated 1 artifact(s)
Run kubectl describe artifactgenerator generator-9689366613293914683 -n greenhouse to see the reconciliation status conditions of the ArtifactGenerator
Status:
Conditions:
Last Transition Time: 2025-10-31T00:14:59Z
Message: reconciliation succeeded, generated 1 artifact(s)
Observed Generation: 2
Reason: Succeeded
Status: True
Type: Ready
Inventory:
Digest: sha256:a6114ad3b1c591f1585d78818320d603e78d29b04f527c88321027c59372d506
Filename: 2528970247.tar.gz
Name: artifact-9689366613293914683
Namespace: greenhouse
Observed Sources Digest: sha256:bc9221b47aecc3f4c75f41b8657a3a7c985823487da94b8521803251a3628030
If there was an error accumulating the manifests, you will see errors in the ArtifactGenerator status conditions. (The same error message and ready status will also be reflected in the Catalog .status.inventory for the respective source.)
- message: >-
artifact-9689366613293914683 build failed: failed to apply copy
operations: failed to apply copy operation from
'@catalog/thanos/plugindefinition.yamls' to
'@artifact/catalogs/thanos/plugindefinition.yamls': source
'thanos/plugindefinition.yamls' does not exist
observedGeneration: 3
reason: BuildFailed
status: "False"
type: Ready
Finally, the accumulated manifests are applied using Flux Kustomization. Run kubectl get kustomization kustomize-9689366613293914683 -n greenhouse to see the status.
NAME AGE READY STATUS
kustomize-9689366613293914683 7d11h True Applied revision: latest@sha256:a6114ad3b1c591f1585d78818320d603e78d29b04f527c88321027c59372d506
Run kubectl describe kustomization kustomize-9689366613293914683 -n greenhouse to see the reconciliation status conditions of the Kustomization
In case of permissions issues, you will see errors in the Kustomization status conditions. (The same error message and ready status will also be reflected in the Catalog .status.inventory for the respective source.)
- lastTransitionTime: "2025-10-31T00:45:08Z"
message: >
PluginDefinition/greenhouse/cert-manager dry-run failed
(Forbidden): plugindefinitions.greenhouse.sap "cert-manager" is
forbidden: User "system:serviceaccount:greenhouse:greenhouse-catalog-sa"
cannot patch resource "plugindefinitions" in API group
"greenhouse.sap" at the cluster scope
observedGeneration: 4
reason: ReconciliationFailed
status: "False"
type: Ready
Next Steps
4.3 - Plugin Catalog
This section provides an overview of the available PluginDefinitions in Greenhouse.
4.3.1 -
Owner Label Injector
Overview
The Owner Label Injector is a Kubernetes mutating admission webhook that automatically ensures every relevant resource in your cluster carries standardized owner labels. These labels enable:
- Incident Routing - Direct alerts to the right team
- Cost Allocation - Track resource ownership for chargeback
- SLO Roll-ups - Aggregate service-level objectives by owner
- Cleanup Automation - Identify orphaned resources
Labels Injected
The webhook automatically adds these labels to resources:
<org>/support-group- The team responsible for the resource<org>/service- The service the resource belongs to (optional)
Both the prefix (<org>) and suffixes can be customized via plugin configuration (config.labels.prefix).
How It Works
The webhook determines ownership using this precedence:
- Existing Labels - If both owner labels are already present and valid, no changes are made
- Helm Release Metadata - For Helm-managed resources, looks up owner info in ConfigMaps:
owner-of-<release>in the release namespace (primary)early-owner-of-<release>(fallback for bootstrapping)
- Static Rules - Regex-based mapping from Helm release name/namespace to owners
- Owner Traversal - Follows
ownerReferencesupward until owner data is found
Special Cases
The injector handles these edge cases intelligently:
vice-president/claimed-by-ingressannotation → treats that Ingress as the ownerVerticalPodAutoscalerCheckpoint→ followsspec.vpaObjectName- PVCs from StatefulSet
volumeClaimTemplates→ derives StatefulSet owner - Pod templates in Deployments/StatefulSets/DaemonSets/Jobs/CronJobs → labels propagated
Components
This plugin deploys:
- Mutating Webhook - Intercepts resource creation/updates to inject labels
- Manager - Webhook server with health/metrics endpoints
- CronJob (optional) - Periodic labeller to backfill existing resources
Configuration
Key Options
| Option | Description | Default |
|---|---|---|
replicaCount | Number of webhook replicas for HA | 3 |
config.labels.prefix | Prefix for injected labels | `` |
config.labels.supportGroupSuffix | Suffix for support group label | support-group |
config.labels.serviceSuffix | Suffix for service label | service |
config.helm.ownerConfigMapPrefix | Prefix for owner ConfigMaps | owner-of- |
config.staticRules | YAML object with rules for Helm→owner mapping | {} |
cronjob.enabled | Enable periodic reconciliation via CronJob | false |
Static Rules Example
Configure regex-based rules when owner ConfigMaps don’t exist:
apiVersion: greenhouse.sap/v1alpha1
kind: Plugin
metadata:
name: owner-label-injector
spec:
pluginDefinition: owner-label-injector
optionValues:
- name: config.labels.prefix
value: "myorg"
- name: config.staticRules
value:
rules:
- helmReleaseName: ".*"
helmReleaseNamespace: "kube-system"
supportGroup: "platform"
service: "kubernetes"
- helmReleaseName: "prometheus-.*"
helmReleaseNamespace: ".*"
supportGroup: "observability"
Resource Requirements
Default resource allocation per replica:
- CPU: 400m request, 800m limit
- Memory: 4000Mi request, 8000Mi limit
Adjust via resources.* options for your cluster size.
Integration with Helm Charts
For applications deployed via Helm, pair them with the common/owner-info helper chart to publish owner ConfigMaps that the injector consumes:
# In your Helm chart's dependencies
dependencies:
- name: owner-info
repository: oci://ghcr.io/cloudoperators/greenhouse-extensions/charts
version: 1.0.0
This creates owner-of-<release> ConfigMaps automatically.
Monitoring
The plugin exposes the following endpoints:
/metrics- Prometheus metrics on port 8080/healthz- Health probe on port 8081/readyz- Readiness probe on port 8081
Prometheus scraping is controlled via pod annotations (prometheus.scrape and prometheus.targets options).
Security
- Failure Policy:
Ignore- API requests succeed even if webhook is down - RBAC: Minimal permissions (get/list/patch resources, get ConfigMaps)
- Security Context: Drops all capabilities, non-root user
Links
- Source Code: github.com/cloudoperators/owner-label-injector
- Documentation: README.md
- Helm Chart: charts/owner-label-injector
Support
For issues, feature requests, or questions, please visit:
4.3.2 - Alerts
Learn more about the alerts plugin. Use it to activate Prometheus alert management for your Greenhouse organisation.
The main terminologies used in this document can be found in core-concepts.
Overview
This Plugin includes a preconfigured Prometheus Alertmanager, which is deployed and managed via the Prometheus Operator, and Supernova, an advanced user interface for Prometheus Alertmanager. Certificates are automatically generated to enable sending alerts from Prometheus to Alertmanager. These alerts can too be sent as Slack notifications with a provided set of notification templates.
Components included in this Plugin:
This Plugin usually is deployed along the kube-monitoring Plugin and does not deploy the Prometheus Operator itself. However, if you are intending to use it stand-alone, you need to explicitly enable the deployment of Prometheus Operator, otherwise it will not work. It can be done in the configuration interface of the plugin.

Disclaimer
This is not meant to be a comprehensive package that covers all scenarios. If you are an expert, feel free to configure the plugin according to your needs.
The Plugin is a deeply configured kube-prometheus-stack Helm chart which helps to keep track of versions and community updates.
It is intended as a platform that can be extended by following the guide.
Contribution is highly appreciated. If you discover bugs or want to add functionality to the plugin, then pull requests are always welcome.
Quick start
This guide provides a quick and straightforward way to use alerts as a Greenhouse Plugin on your Kubernetes cluster.
Prerequisites
- A running and Greenhouse-onboarded Kubernetes cluster. If you don’t have one, follow the Cluster onboarding guide.
- kube-monitoring plugin (which brings in Prometheus Operator) OR stand alone: awareness to enable the deployment of Prometheus Operator with this plugin
Step 1:
You can install the alerts package in your cluster with Helm manually or let the Greenhouse platform lifecycle it for you automatically. For the latter, you can either:
- Go to Greenhouse dashboard and select the Alerts Plugin from the catalog. Specify the cluster and required option values.
- Create and specify a
Pluginresource in your Greenhouse central cluster according to the examples.
Step 2:
After the installation, you can access the Supernova UI by navigating to the Alerts tab in the Greenhouse dashboard.
Step 3:
Greenhouse regularly performs integration tests that are bundled with alerts. These provide feedback on whether all the necessary resources are installed and continuously up and running. You will find messages about this in the plugin status and also in the Greenhouse dashboard.
Configuration
Prometheus Alertmanager options
| Name | Description | Value |
|---|---|---|
global.caCert | Additional caCert to add to the CA bundle | "" |
alerts.commonLabels | Labels to apply to all resources | {} |
alerts.defaultRules.create | Creates community Alertmanager alert rules. | true |
alerts.defaultRules.labels | kube-monitoring plugin: <plugin.name> to evaluate Alertmanager rules. | {} |
alerts.alertmanager.enabled | Deploy Prometheus Alertmanager | true |
alerts.alertmanager.annotations | Annotations for Alertmanager | {} |
alerts.alertmanager.config | Alertmanager configuration directives. | {} |
alerts.alertmanager.ingress.enabled | Deploy Alertmanager Ingress | false |
alerts.alertmanager.ingress.hosts | Must be provided if Ingress is enabled. | [] |
alerts.alertmanager.ingress.tls | Must be a valid TLS configuration for Alertmanager Ingress. Supernova UI passes the client certificate to retrieve alerts. | {} |
alerts.alertmanager.ingress.ingressClassname | Specifies the ingress-controller | nginx |
alerts.alertmanager.servicemonitor.additionalLabels | kube-monitoring plugin: <plugin.name> to scrape Alertmanager metrics. | {} |
alerts.alertmanager.alertmanagerConfig.slack.routes[].name | Name of the Slack route. | "" |
alerts.alertmanager.alertmanagerConfig.slack.routes[].channel | Slack channel to post alerts to. Must be defined with slack.webhookURL. | "" |
alerts.alertmanager.alertmanagerConfig.slack.routes[].webhookURL | Slack webhookURL to post alerts to. Must be defined with slack.channel. | "" |
alerts.alertmanager.alertmanagerConfig.slack.routes[].matchers | List of matchers that the alert’s label should match. matchType , name , regex , value | [] |
alerts.alertmanager.alertmanagerConfig.webhook.routes[].name | Name of the webhook route. | "" |
alerts.alertmanager.alertmanagerConfig.webhook.routes[].url | Webhook url to post alerts to. | "" |
alerts.alertmanager.alertmanagerConfig.webhook.routes[].matchers | List of matchers that the alert’s label should match. matchType , name , regex , value | [] |
alerts.alertmanager.alertmanagerSpec.alertmanagerConfiguration | AlermanagerConfig to be used as top level configuration | false |
alerts.alertmanager.alertmanagerConfig.webhook.routes[].matchers | List of matchers that the alert’s label should match. matchType , name , regex , value | [] |
cert-manager options
| Name | Description | Value |
|---|---|---|
alerts.certManager.enabled | Creates jetstack/cert-manager resources to generate Issuer and Certificates for Prometheus authentication. | true |
alerts.certManager.rootCert.duration | Duration, how long the root certificate is valid. | "5y" |
alerts.certManager.admissionCert.duration | Duration, how long the admission certificate is valid. | "1y" |
alerts.certManager.issuerRef.name | Name of the existing Issuer to use. | "" |
Supernova options
theme: Override the default theme. Possible values are "theme-light" or "theme-dark" (default)
endpoint: Alertmanager API Endpoint URL /api/v2. Should be one of alerts.alertmanager.ingress.hosts
silenceExcludedLabels: SilenceExcludedLabels are labels that are initially excluded by default when creating a silence. However, they can be added if necessary when utilizing the advanced options in the silence form.The labels must be an array of strings. Example: ["pod", "pod_name", "instance"]
filterLabels: FilterLabels are the labels shown in the filter dropdown, enabling users to filter alerts based on specific criteria. The ‘Status’ label serves as a default filter, automatically computed from the alert status attribute and will be not overwritten. The labels must be an array of strings. Example: ["app", "cluster", "cluster_type"]
predefinedFilters: PredefinedFilters are filters applied through in the UI to differentiate between contexts through matching alerts with regular expressions. They are loaded by default when the application is loaded. The format is a list of objects including name, displayname and matchers (containing keys corresponding value). Example:
[
{
"name": "prod",
"displayName": "Productive System",
"matchers": {
"region": "^prod-.*"
}
}
]
silenceTemplates: SilenceTemplates are used in the Modal (schedule silence) to allow pre-defined silences to be used to scheduled maintenance windows. The format consists of a list of objects including description, editable_labels (array of strings specifying the labels that users can modify), fixed_labels (map containing fixed labels and their corresponding values), status, and title. Example:
"silenceTemplates": [
{
"description": "Description of the silence template",
"editable_labels": ["region"],
"fixed_labels": {
"name": "Marvin",
},
"status": "active",
"title": "Silence"
}
]
Managing Alertmanager configuration
ref:
- https://prometheus.io/docs/alerting/configuration/#configuration-file
- https://prometheus.io/webtools/alerting/routing-tree-editor/
By default, the Alertmanager instances will start with a minimal configuration which isn’t really useful since it doesn’t send any notification when receiving alerts.
You have multiple options to provide the Alertmanager configuration:
- You can use
alerts.alertmanager.configto define a Alertmanager configuration. Example below.
config:
global:
resolve_timeout: 5m
inhibit_rules:
- source_matchers:
- "severity = critical"
target_matchers:
- "severity =~ warning|info"
equal:
- "namespace"
- "alertname"
- source_matchers:
- "severity = warning"
target_matchers:
- "severity = info"
equal:
- "namespace"
- "alertname"
- source_matchers:
- "alertname = InfoInhibitor"
target_matchers:
- "severity = info"
equal:
- "namespace"
route:
group_by: ["namespace"]
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
receiver: "null"
routes:
- receiver: "null"
matchers:
- alertname =~ "InfoInhibitor|Watchdog"
receivers:
- name: "null"
templates:
- "/etc/alertmanager/config/*.tmpl"
- You can discover
AlertmanagerConfigobjects. Thespec.alertmanagerConfigSelectoris always set tomatchLabels:plugin: <name>to tell the operator whichAlertmanagerConfigsobjects should be selected and merged with the main Alertmanager configuration. Note: The default strategy for aAlertmanagerConfigobject to match alerts isOnNamespace.
apiVersion: monitoring.coreos.com/v1alpha1
kind: AlertmanagerConfig
metadata:
name: config-example
labels:
alertmanagerConfig: example
pluginDefinition: alerts-example
spec:
route:
groupBy: ["job"]
groupWait: 30s
groupInterval: 5m
repeatInterval: 12h
receiver: "webhook"
receivers:
- name: "webhook"
webhookConfigs:
- url: "http://example.com/"
- You can use
alerts.alertmanager.alertmanagerSpec.alertmanagerConfigurationto reference anAlertmanagerConfigobject in the same namespace which defines the main Alertmanager configuration.
# Example with select a global alertmanagerconfig
alertmanagerConfiguration:
name: global-alertmanager-configuration
TLS Certificate Requirement
Greenhouse onboarded Prometheus installations need to communicate with the Alertmanager component to enable processing of alerts. If an Alertmanager Ingress is enabled, this requires a TLS certificate to be configured and trusted by Alertmanger to ensure the communication. To enable automatic self-signed TLS certificate provisioning via cert-manager, set the alerts.certManager.enabled value to true.
Note: Prerequisite of this feature is a installed jetstack/cert-manager which can be implemented via the Greenhouse cert-manager Plugin.
Examples
Deploy alerts with Alertmanager
apiVersion: greenhouse.sap/v1alpha1
kind: Plugin
metadata:
name: alerts
spec:
pluginDefinition: alerts
disabled: false
displayName: Alerts
optionValues:
- name: alerts.alertmanager.enabled
value: true
- name: alerts.alertmanager.ingress.enabled
value: true
- name: alerts.alertmanager.ingress.hosts
value:
- alertmanager.dns.example.com
- name: alerts.alertmanager.ingress.tls
value:
- hosts:
- alertmanager.dns.example.com
secretName: tls-alertmanager-dns-example-com
- name: alerts.alertmanagerConfig.slack.routes
value:
- channel: slack-warning-channel
webhookURL: https://hooks.slack.com/services/some-id
matchers:
- name: severity
matchType: "="
value: "warning"
- channel: slack-critical-channel
webhookURL: https://hooks.slack.com/services/some-id
matchers:
- name: severity
matchType: "="
value: "critical"
- name: alerts.alertmanagerConfig.webhook.routes
value:
- name: webhook-route
url: https://some-webhook-url
matchers:
- name: alertname
matchType: "=~"
value: ".*"
- name: alerts.alertmanager.serviceMonitor.additionalLabels
value:
plugin: kube-monitoring
- name: alerts.defaultRules.create
value: true
- name: alerts.defaultRules.labels
value:
plugin: kube-monitoring
- name: endpoint
value: https://alertmanager.dns.example.com/api/v2
- name: filterLabels
value:
- job
- severity
- status
- name: silenceExcludedLabels
value:
- pod
- pod_name
- instance
Deploy alerts without Alertmanager (Bring your own Alertmanager - Supernova UI only)
apiVersion: greenhouse.sap/v1alpha1
kind: Plugin
metadata:
name: alerts
spec:
pluginDefinition: alerts
disabled: false
displayName: Alerts
optionValues:
- name: alerts.alertmanager.enabled
value: false
- name: alerts.alertmanager.ingress.enabled
value: false
- name: alerts.defaultRules.create
value: false
- name: endpoint
value: https://alertmanager.dns.example.com/api/v2
- name: filterLabels
value:
- job
- severity
- status
- name: silenceExcludedLabels
value:
- pod
- pod_name
- instance
4.3.3 - Audit Logs Plugin
Learn more about the Audit Logs Plugin. Use it to enable the ingestion, collection and export of telemetry signals (logs and metrics) for your Greenhouse cluster.
The main terminologies used in this document can be found in core-concepts.
Overview
OpenTelemetry is an observability framework and toolkit for creating and managing telemetry data such as metrics, logs and traces. Unlike other observability tools, OpenTelemetry is vendor and tool agnostic, meaning it can be used with a variety of observability backends, including open source tools such as OpenSearch and Prometheus.
The focus of the Plugin is to provide easy-to-use configurations for common use cases of receiving, processing and exporting telemetry data in Kubernetes. The storage and visualization of the same is intentionally left to other tools.
Components included in this Plugin:
Architecture

Note
It is the intention to add more configuration over time and contributions of your very own configuration is highly appreciated. If you discover bugs or want to add functionality to the Plugin, feel free to create a pull request.
Quick Start
This guide provides a quick and straightforward way to use OpenTelemetry for Logs as a Greenhouse Plugin on your Kubernetes cluster.
Prerequisites
- A running and Greenhouse-onboarded Kubernetes cluster. If you don’t have one, follow the Cluster onboarding guide.
- For logs, a OpenSearch instance to store. If you don’t have one, reach out to your observability team to get access to one.
- We recommend a running cert-manager in the cluster before installing the Logs Plugin
- To gather metrics, you must have a Prometheus instance in the onboarded cluster for storage and for managing Prometheus specific CRDs. If you don not have an instance, install the kube-monitoring Plugin first.
- The Audit Logs Plugin currently requires the OpenTelemetry Operator bundled in the Logs Plugin to be installed in the same cluster beforehand. This is a technical limitation of the Audit Logs Plugin and will be removed in future releases.
Step 1:
You can install the Logs package in your cluster by installing it with Helm manually or let the Greenhouse platform lifecycle do it for you automatically. For the latter, you can either:
- Go to Greenhouse dashboard and select the Logs Plugin from the catalog. Specify the cluster and required option values.
- Create and specify a
Pluginresource in your Greenhouse central cluster according to the examples.
Step 2:
The package will deploy the OpenTelemetry collectors and auto-instrumentation of the workload. By default, the package will include a configuration for collecting metrics and logs. The log-collector is currently processing data from the preconfigured receivers:
- Files via the Filelog Receiver
- Kubernetes Events from the Kubernetes API server
- Journald events from systemd journal
- its own metrics
Based on the backend selection the telemetry data will be exporter to the backend.
Failover Connector
The Logs Plugin comes with a Failover Connector for OpenSearch for two users. The connector will periodically try to establish a stable connection for the prefered user (failover_username_a) and in case of a failed try, the connector will try to establish a connection with the fallback user (failover_username_b). This feature can be used to secure the shipping of logs in case of expiring credentials or password rotation.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| auditLogs.cluster | string | nil | Cluster label for Logging |
| auditLogs.collectorImage.repository | string | "ghcr.io/cloudoperators/opentelemetry-collector-contrib" | overrides the default image repository for the OpenTelemetry Collector image. |
| auditLogs.collectorImage.tag | string | "2016982" | overrides the default image tag for the OpenTelemetry Collector image. |
| auditLogs.customLabels | string | nil | Custom labels to apply to all OpenTelemetry related resources |
| auditLogs.logsCollector.enabled | bool | true | Activates the standard configuration for Logs. |
| auditLogs.openSearchLogs.endpoint | string | nil | Endpoint URL for OpenSearch |
| auditLogs.openSearchLogs.failover | object | {"enabled":true} | Activates the failover mechanism for shipping logs using the failover_username_band failover_password_b credentials in case the credentials failover_username_a and failover_password_a have expired. |
| auditLogs.openSearchLogs.failover_password_a | string | nil | Password for OpenSearch endpoint |
| auditLogs.openSearchLogs.failover_password_b | string | nil | Second Password (as a failover) for OpenSearch endpoint |
| auditLogs.openSearchLogs.failover_username_a | string | nil | Username for OpenSearch endpoint |
| auditLogs.openSearchLogs.failover_username_b | string | nil | Second Username (as a failover) for OpenSearch endpoint |
| auditLogs.openSearchLogs.index | string | nil | Name for OpenSearch index |
| auditLogs.prometheus.additionalLabels | object | {} | Label selectors for the Prometheus resources to be picked up by prometheus-operator. |
| auditLogs.prometheus.podMonitor | object | {"enabled":false} | Activates the service-monitoring for the Logs Collector. |
| auditLogs.prometheus.rules | object | {"additionalRuleLabels":null,"create":true,"labels":{}} | Default rules for monitoring the opentelemetry components. |
| auditLogs.prometheus.rules.additionalRuleLabels | string | nil | Additional labels for PrometheusRule alerts. |
| auditLogs.prometheus.rules.create | bool | true | Enables PrometheusRule resources to be created. |
| auditLogs.prometheus.rules.labels | object | {} | Labels for PrometheusRules. |
| auditLogs.prometheus.serviceMonitor | object | {"enabled":false} | Activates the pod-monitoring for the Logs Collector. |
| auditLogs.region | string | nil | Region label for Logging |
| commonLabels | string | nil | Common labels to apply to all resources |
Examples
TBD
4.3.4 - Cert-manager
This Plugin provides the cert-manager to automate the management of TLS certificates.
Configuration
This section highlights configuration of selected Plugin features.
All available configuration options are described in the plugin.yaml.
Ingress shim
An Ingress resource in Kubernetes configures external access to services in a Kubernetes cluster.
Securing ingress resources with TLS certificates is a common use-case and the cert-manager can be configured to handle these via the ingress-shim component.
It can be enabled by deploying an issuer in your organization and setting the following options on this plugin.
| Option | Type | Description |
|---|---|---|
cert-manager.ingressShim.defaultIssuerName | string | Name of the cert-manager issuer to use for TLS certificates |
cert-manager.ingressShim.defaultIssuerKind | string | Kind of the cert-manager issuer to use for TLS certificates |
cert-manager.ingressShim.defaultIssuerGroup | string | Group of the cert-manager issuer to use for TLS certificates |
4.3.5 - Decentralized Observer of Policies (Violations)
This directory contains the Greenhouse plugin for the Decentralized Observer of Policies (DOOP).
DOOP
To perform automatic validations on Kubernetes objects, we run a deployment of OPA Gatekeeper in each cluster. This dashboard aggregates all policy violations reported by those Gatekeeper instances.
4.3.6 - Designate Ingress CNAME operator (DISCO)
This Plugin provides the Designate Ingress CNAME operator (DISCO) to automate management of DNS entries in OpenStack Designate for Ingress and Services in Kubernetes.
4.3.7 - DigiCert issuer
This Plugin provides the digicert-issuer, an external Issuer extending the cert-manager with the DigiCert cert-central API.
4.3.8 - External DNS
This Plugin provides the external DNS operator) which synchronizes exposed Kubernetes Services and Ingresses with DNS providers.
4.3.9 - Ingress NGINX
This plugin contains the ingress NGINX controller.
Example
To instantiate the plugin create a Plugin like:
apiVersion: greenhouse.sap/v1alpha1
kind: Plugin
metadata:
name: ingress-nginx
spec:
pluginDefinition: ingress-nginx-v4.4.0
values:
- name: controller.service.loadBalancerIP
value: 1.2.3.4
4.3.10 - Kubernetes Monitoring
Learn more about the kube-monitoring plugin. Use it to activate Kubernetes monitoring for your Greenhouse cluster.
The main terminologies used in this document can be found in core-concepts.
Overview
Observability is often required for operation and automation of service offerings. To get the insights provided by an application and the container runtime environment, you need telemetry data in the form of metrics or logs sent to backends such as Prometheus or OpenSearch. With the kube-monitoring Plugin, you will be able to cover the metrics part of the observability stack.
This Plugin includes a pre-configured package of components that help make getting started easy and efficient. At its core, an automated and managed Prometheus installation is provided using the prometheus-operator. This is complemented by Prometheus target configuration for the most common Kubernetes components providing metrics by default. In addition, Cloud operators curated Prometheus alerting rules and Plutono dashboards are included to provide a comprehensive monitoring solution out of the box.

Components included in this Plugin:
- Prometheus
- Prometheus Operator
- Prometheus target configuration for Kubernetes metrics APIs (e.g. kubelet, apiserver, coredns, etcd)
- Prometheus node exporter
- kube-state-metrics
- kubernetes-operations
Disclaimer
It is not meant to be a comprehensive package that covers all scenarios. If you are an expert, feel free to configure the plugin according to your needs.
The Plugin is a deeply configured kube-prometheus-stack Helm chart which helps to keep track of versions and community updates.
It is intended as a platform that can be extended by following the guide.
Contribution is highly appreciated. If you discover bugs or want to add functionality to the plugin, then pull requests are always welcome.
Quick start
This guide provides a quick and straightforward way to use kube-monitoring as a Greenhouse Plugin on your Kubernetes cluster.
Prerequisites
- A running and Greenhouse-onboarded Kubernetes cluster. If you don’t have one, follow the Cluster onboarding guide.
Step 1:
You can install the kube-monitoring package in your cluster by installing it with Helm manually or let the Greenhouse platform lifecycle it for you automatically. For the latter, you can either:
- Go to Greenhouse dashboard and select the Kubernetes Monitoring plugin from the catalog. Specify the cluster and required option values.
- Create and specify a
Pluginresource in your Greenhouse central cluster according to the examples.
Step 2:
After installation, Greenhouse will provide a generated link to the Prometheus user interface. This is done via the annotation greenhouse.sap/expose: “true” at the Prometheus Service resource.
Step 3:
Greenhouse regularly performs integration tests that are bundled with kube-monitoring. These provide feedback on whether all the necessary resources are installed and continuously up and running. You will find messages about this in the plugin status and also in the Greenhouse dashboard.
Absent-metrics-operator
The kube-monitoring Plugin can optionally deploy and configure the absent-metrics-operator to help detect missing or absent metrics in your Prometheus setup. This operator automatically generates alerts when expected metrics are not present, improving observability and alerting coverage.
Service Discovery
The kube-monitoring Plugin provides a PodMonitor to automatically discover the Prometheus metrics of the Kubernetes Pods in any Namespace. The PodMonitor is configured to detect the metrics endpoint of the Pods if the following annotations are set:
metadata:
annotations:
greenhouse/scrape: “true”
greenhouse/target: <kube-monitoring plugin name>
Note: The annotations needs to be added manually to have the pod scraped and the port name needs to match.
Examples
Deploy kube-monitoring into a remote cluster
apiVersion: greenhouse.sap/v1alpha1
kind: Plugin
metadata:
name: kube-monitoring
spec:
pluginDefinition: kube-monitoring
disabled: false
optionValues:
- name: kubeMonitoring.prometheus.prometheusSpec.retention
value: 30d
- name: kubeMonitoring.prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.resources.requests.storage
value: 100Gi
- name: kubeMonitoring.prometheus.service.labels
value:
greenhouse.sap/expose: "true"
- name: kubeMonitoring.prometheus.prometheusSpec.externalLabels
value:
cluster: example-cluster
organization: example-org
region: example-region
- name: alerts.enabled
value: true
- name: alerts.alertmanagers.hosts
value:
- alertmanager.dns.example.com
- name: alerts.alertmanagers.tlsConfig.cert
valueFrom:
secret:
key: tls.crt
name: tls-<org-name>-prometheus-auth
- name: alerts.alertmanagers.tlsConfig.key
valueFrom:
secret:
key: tls.key
name: tls-<org-name>-prometheus-auth
Deploy Prometheus only
Example Plugin to deploy Prometheus with the kube-monitoring Plugin.
NOTE: If you are using kube-monitoring for the first time in your cluster, it is necessary to set kubeMonitoring.prometheusOperator.enabled to true.
apiVersion: greenhouse.sap/v1alpha1
kind: Plugin
metadata:
name: example-prometheus-name
spec:
pluginDefinition: kube-monitoring
disabled: false
optionValues:
- name: kubeMonitoring.defaultRules.create
value: false
- name: kubeMonitoring.kubernetesServiceMonitors.enabled
value: false
- name: kubeMonitoring.prometheusOperator.enabled
value: false
- name: kubeMonitoring.kubeStateMetrics.enabled
value: false
- name: kubeMonitoring.nodeExporter.enabled
value: false
- name: kubeMonitoring.prometheus.prometheusSpec.retention
value: 30d
- name: kubeMonitoring.prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.resources.requests.storage
value: 100Gi
- name: kubeMonitoring.prometheus.service.labels
value:
greenhouse.sap/expose: "true"
- name: kubeMonitoring.prometheus.prometheusSpec.externalLabels
value:
cluster: example-cluster
organization: example-org
region: example-region
- name: alerts.enabled
value: true
- name: alerts.alertmanagers.hosts
value:
- alertmanager.dns.example.com
- name: alerts.alertmanagers.tlsConfig.cert
valueFrom:
secret:
key: tls.crt
name: tls-<org-name>-prometheus-auth
- name: alerts.alertmanagers.tlsConfig.key
valueFrom:
secret:
key: tls.key
name: tls-<org-name>-prometheus-auth
Thanos object storage
To enable long-term storage for Prometheus metrics using Thanos, you need to configure the objectStorageConfig section. This can be done in two ways:
1. Use an existing Secret
If you already have a Kubernetes Secret containing your object storage configuration (e.g., S3 credentials, Swift, …), you can reference it directly. In your optionValues, set:
- name: kubeMonitoring.prometheus.prometheusSpec.thanos.objectStorageConfig.existingSecret
value:
name: <secret-name>
key: <secret-key>
name: Name of the existing Secret.key: Key in the Secret containing the object storage config (YAML or JSON).
2. Pass plain text config (auto-create Secret)
Alternatively, you can provide the object storage configuration directly. The plugin will create a Secret for you and configure Thanos to use it. Example for Swift:
- name: kubeMonitoring.prometheus.prometheusSpec.thanos.objectStorageConfig.secret
value:
type: SWIFT
config:
auth_url: ""
username:
domain_name: "Default"
password: ""
project_name: "master"
project_domain_name: ""
region_name:
container_name:
type: Storage backend type (e.g.,Swift,S3).config: Key-value pairs for your backend (see Thanos storage docs for details).
Note:
If existingSecret is set, the secret config will be ignored.
This allows you to flexibly manage your Thanos object storage credentials, either by referencing an existing Kubernetes Secret or by providing the configuration inline for automatic creation of Secret.
Values used here are described in the Prometheus Operator Spec.
Extension of the plugin
kube-monitoring can be extended with your own Prometheus alerting rules and target configurations via the Custom Resource Definitions (CRDs) of the Prometheus operator. The user-defined resources to be incorporated with the desired configuration are defined via label selections.
The CRD PrometheusRule enables the definition of alerting and recording rules that can be used by Prometheus or Thanos Rule instances. Alerts and recording rules are reconciled and dynamically loaded by the operator without having to restart Prometheus or Thanos Rule.
kube-monitoring Prometheus will automatically discover and load the rules that match labels plugin: <plugin-name>.
Example:
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: example-prometheus-rule
labels:
plugin: <metadata.name>
## e.g plugin: kube-monitoring
spec:
groups:
- name: example-group
rules:
...
The CRDs PodMonitor, ServiceMonitor, Probe and ScrapeConfig allow the definition of a set of target endpoints to be scraped by Prometheus. The operator will automatically discover and load the configurations that match labels plugin: <plugin-name>.
Example:
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: example-pod-monitor
labels:
plugin: <metadata.name>
## e.g plugin: kube-monitoring
spec:
selector:
matchLabels:
app: example-app
namespaceSelector:
matchNames:
- example-namespace
podMetricsEndpoints:
- port: http
...
Values
absent-metrics-operator options
| Key | Type | Default | Description |
|---|---|---|---|
| absentMetricsOperator.enabled | bool | false | Enable absent-metrics-operator |
Alertmanager options
| Key | Type | Default | Description |
|---|---|---|---|
| alerts.alertmanagers.hosts | list | [] | List of Alertmanager hostsd alerts to |
| alerts.alertmanagers.tlsConfig.cert | string | "" | TLS certificate for communication with Alertmanager |
| alerts.alertmanagers.tlsConfig.key | string | "" | TLS key for communication with Alertmanager |
| alerts.enabled | bool | false | To send alerts to Alertmanager |
Blackbox exporter config
| Key | Type | Default | Description |
|---|---|---|---|
| blackboxExporter.enabled | bool | false | To enable Blackbox Exporter (supported probers: grpc-prober) |
| blackboxExporter.extraVolumes | list | - name: blackbox-exporter-tls secret: defaultMode: 420 secretName: <secretName> | TLS secret of the Thanos global instance to mount for probing, mandatory for using Blackbox exporter. |
Global options
| Key | Type | Default | Description |
|---|---|---|---|
| global.commonLabels | object | {} | Labels to apply to all resources This can be used to add a support_group or service label to all resources and alerting rules. |
Kubernetes component scraper options
| Key | Type | Default | Description |
|---|---|---|---|
| kubeMonitoring.coreDns.enabled | bool | true | Component scraping coreDns. Use either this or kubeDns |
| kubeMonitoring.kubeApiServer.enabled | bool | true | Component scraping the kube API server |
| kubeMonitoring.kubeControllerManager.enabled | bool | false | Component scraping the kube controller manager |
| kubeMonitoring.kubeDns.enabled | bool | false | Component scraping kubeDns. Use either this or coreDns |
| kubeMonitoring.kubeEtcd.enabled | bool | true | Component scraping etcd |
| kubeMonitoring.kubeProxy.enabled | bool | false | Component scraping kube proxy |
| kubeMonitoring.kubeScheduler.enabled | bool | false | Component scraping kube scheduler |
| kubeMonitoring.kubeStateMetrics.enabled | bool | true | Component scraping kube state metrics |
| kubeMonitoring.kubelet.enabled | bool | true | Component scraping the kubelet and kubelet-hosted cAdvisor |
| kubeMonitoring.kubernetesServiceMonitors.enabled | bool | true | Flag to disable all the Kubernetes component scrapers |
| kubeMonitoring.nodeExporter.enabled | bool | true | Deploy node exporter as a daemonset to all nodes |
Prometheus options
| Key | Type | Default | Description |
|---|---|---|---|
| kubeMonitoring.prometheus.annotations | object | {} | Annotations for Prometheus |
| kubeMonitoring.prometheus.enabled | bool | true | Deploy a Prometheus instance |
| kubeMonitoring.prometheus.ingress.enabled | bool | false | Deploy Prometheus Ingress |
| kubeMonitoring.prometheus.ingress.hosts | list | [] | Must be provided if Ingress is enabled |
| kubeMonitoring.prometheus.ingress.ingressClassname | string | "nginx" | Specifies the ingress-controller |
| kubeMonitoring.prometheus.prometheusSpec.additionalArgs | list | [] | Allows setting additional arguments for the Prometheus container |
| kubeMonitoring.prometheus.prometheusSpec.additionalScrapeConfigs | string | "" | Next to ScrapeConfig CRD, you can use AdditionalScrapeConfigs, which allows specifying additional Prometheus scrape configurations |
| kubeMonitoring.prometheus.prometheusSpec.evaluationInterval | string | "" | Interval between consecutive evaluations |
| kubeMonitoring.prometheus.prometheusSpec.externalLabels | object | {} | External labels to add to any time series or alerts when communicating with external systems like Alertmanager |
| kubeMonitoring.prometheus.prometheusSpec.logLevel | string | "" | Log level to be configured for Prometheus |
| kubeMonitoring.prometheus.prometheusSpec.podMonitorSelector.matchLabels | object | { plugin: <metadata.name> } | PodMonitors to be selected for target discovery. |
| kubeMonitoring.prometheus.prometheusSpec.probeSelector.matchLabels | object | { plugin: <metadata.name> } | Probes to be selected for target discovery. |
| kubeMonitoring.prometheus.prometheusSpec.retention | string | "" | How long to retain metrics |
| kubeMonitoring.prometheus.prometheusSpec.ruleSelector.matchLabels | object | { plugin: <metadata.name> } | PrometheusRules to be selected for target discovery. If {}, select all PrometheusRules |
| kubeMonitoring.prometheus.prometheusSpec.scrapeConfigSelector.matchLabels | object | { plugin: <metadata.name> } | scrapeConfigs to be selected for target discovery. |
| kubeMonitoring.prometheus.prometheusSpec.scrapeInterval | string | "" | Interval between consecutive scrapes. Defaults to 30s |
| kubeMonitoring.prometheus.prometheusSpec.scrapeTimeout | string | "" | Number of seconds to wait for target to respond before erroring |
| kubeMonitoring.prometheus.prometheusSpec.serviceMonitorSelector.matchLabels | object | { plugin: <metadata.name> } | ServiceMonitors to be selected for target discovery. If {}, select all ServiceMonitors |
| kubeMonitoring.prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.resources | object | {"requests":{"storage":"50Gi"}} | How large the persistent volume should be to house the Prometheus database. Default 50Gi. |
| kubeMonitoring.prometheus.tlsConfig.caCert | string | "Secret" | CA certificate to verify technical clients at Prometheus Ingress |
Prometheus-operator options
| Key | Type | Default | Description |
|---|---|---|---|
| kubeMonitoring.prometheusOperator.alertmanagerConfigNamespaces | list | [] | Filter namespaces to look for prometheus-operator AlertmanagerConfig resources |
| kubeMonitoring.prometheusOperator.alertmanagerInstanceNamespaces | list | [] | Filter namespaces to look for prometheus-operator Alertmanager resources |
| kubeMonitoring.prometheusOperator.enabled | bool | true | Manages Prometheus and Alertmanager components |
| kubeMonitoring.prometheusOperator.prometheusInstanceNamespaces | list | [] | Filter namespaces to look for prometheus-operator Prometheus resources |
4.3.11 - Logs Plugin
Learn more about the Logs Plugin. Use it to enable the ingestion, collection and export of telemetry signals (logs and metrics) for your Greenhouse cluster.
The main terminologies used in this document can be found in core-concepts.
Overview
OpenTelemetry is an observability framework and toolkit for creating and managing telemetry data such as metrics, logs and traces. Unlike other observability tools, OpenTelemetry is vendor and tool agnostic, meaning it can be used with a variety of observability backends, including open source tools such as OpenSearch and Prometheus.
The focus of the Plugin is to provide easy-to-use configurations for common use cases of receiving, processing and exporting telemetry data in Kubernetes. The storage and visualization of the same is intentionally left to other tools.
Components included in this Plugin:
Architecture

Note
It is the intention to add more configuration over time and contributions of your very own configuration is highly appreciated. If you discover bugs or want to add functionality to the Plugin, feel free to create a pull request.
Quick Start
This guide provides a quick and straightforward way to use OpenTelemetry for Logs as a Greenhouse Plugin on your Kubernetes cluster.
Prerequisites
- A running and Greenhouse-onboarded Kubernetes cluster. If you don’t have one, follow the Cluster onboarding guide.
- For logs, a OpenSearch instance to store. If you don’t have one, reach out to your observability team to get access to one.
- We recommend a running cert-manager in the cluster before installing the Logs Plugin
- To gather metrics, you must have a Prometheus instance in the onboarded cluster for storage and for managing Prometheus specific CRDs. If you don not have an instance, install the kube-monitoring Plugin first.
Step 1:
You can install the Logs package in your cluster by installing it with Helm manually or let the Greenhouse platform lifecycle do it for you automatically. For the latter, you can either:
- Go to Greenhouse dashboard and select the Logs Plugin from the catalog. Specify the cluster and required option values.
- Create and specify a
Pluginresource in your Greenhouse central cluster according to the examples.
Step 2:
You can choose if you want to deploy the OpenTelemetry Operator including the collectors or set opentelemetry-operator.enabled to false in case you already have an existing Operator deployed in your cluster. The OpenTelemetry Operator works as a manager for the collectors and auto-instrumentation of the workload.
By default, the package will include a configuration for collecting metrics and logs. The log-collector is currently processing data from the preconfigured receivers:
- Files via the Filelog Receiver
- Kubernetes Events from the Kubernetes API server
- Journald events from systemd journal
- its own metrics
You can disable the collection of logs by setting openTelemetry.logCollector.enabled to false. The same is true for disabling the collection of metrics by setting openTelemetry.metricsCollector.enabled to false.
The logsCollector comes with a standard set of log-processing, such as adding cluster information and common labels for Journald events.
In addition we provide default pipelines for common log types. Currently the following log types have default configurations that can be enabled (requires logsCollector.enabled to true):
- KVM:
openTelemetry.logsCollector.kvmConfig: Logs from Kernel-based Virtual Machines (KVMs) providing insights into virtualization activities, resource usage, and system performance - Ceph:
openTelemetry.logsCollector.cephConfig: Logs from Ceph storage systems, capturing information about cluster operations, performance metrics, and health status
These default configurations provide common labels and Grok parsing for logs emitted through the respective services.
Based on the backend selection the telemetry data will be exporter to the backend.
Step 3:
Greenhouse regularly performs integration tests that are bundled with the Logs Plugin. These provide feedback on whether all the necessary resources are installed and continuously up and running. You will find messages about this in the Plugin status and also in the Greenhouse dashboard.
Failover Connector
The Logs Plugin comes with a Failover Connector for OpenSearch for two users. The connector will periodically try to establish a stable connection for the prefered user (failover_username_a) and in case of a failed try, the connector will try to establish a connection with the fallback user (failover_username_b). This feature can be used to secure the shipping of logs in case of expiring credentials or password rotation.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| commonLabels | object | {} | common labels to apply to all resources. |
| customCRDs.enabled | bool | true | The required CRDs used by this dependency are version-controlled in this repository under ./charts/crds. |
| openTelemetry.cluster | string | nil | Cluster label for Logging |
| openTelemetry.collectorImage | object | {"repository":"ghcr.io/cloudoperators/opentelemetry-collector-contrib","tag":"2016982"} | OpenTelemetry Collector image configuration |
| openTelemetry.collectorImage.repository | string | "ghcr.io/cloudoperators/opentelemetry-collector-contrib" | Image repository for OpenTelemetry Collector |
| openTelemetry.collectorImage.tag | string | "2016982" | Image tag for OpenTelemetry Collector |
| openTelemetry.customLabels | object | {} | custom Labels applied to servicemonitor, secrets and collectors |
| openTelemetry.logsCollector.cephConfig | object | {"enabled":false} | Activates the configuration for Ceph logs (requires logsCollector to be enabled). |
| openTelemetry.logsCollector.enabled | bool | true | Activates the standard configuration for Logs. |
| openTelemetry.logsCollector.failover | object | {"enabled":true} | Activates the failover mechanism for shipping logs using the failover_username_band failover_password_b credentials in case the credentials failover_username_a and failover_password_a have expired. |
| openTelemetry.logsCollector.kvmConfig | object | {"enabled":false} | Activates the configuration for KVM logs (requires logsCollector to be enabled). |
| openTelemetry.metricsCollector | object | {"enabled":false} | Activates the standard configuration for metrics. |
| openTelemetry.openSearchLogs.endpoint | string | nil | Endpoint URL for OpenSearch |
| openTelemetry.openSearchLogs.failover_password_a | string | nil | Password for OpenSearch endpoint |
| openTelemetry.openSearchLogs.failover_password_b | string | nil | Second Password (as a failover) for OpenSearch endpoint |
| openTelemetry.openSearchLogs.failover_username_a | string | nil | Username for OpenSearch endpoint |
| openTelemetry.openSearchLogs.failover_username_b | string | nil | Second Username (as a failover) for OpenSearch endpoint |
| openTelemetry.openSearchLogs.index | string | nil | Name for OpenSearch index |
| openTelemetry.prometheus.additionalLabels | object | {} | Label selectors for the Prometheus resources to be picked up by prometheus-operator. |
| openTelemetry.prometheus.podMonitor | object | {"enabled":true} | Activates the pod-monitoring for the Logs Collector. |
| openTelemetry.prometheus.rules | object | {"additionalRuleLabels":null,"annotations":{},"create":true,"enabled":["FilelogRefusedLogs","LogsOTelLogsMissing","LogsOTelLogsDecreasing","ReconcileErrors","ReceiverRefusedMetric","WorkqueueDepth"],"labels":{}} | Default rules for monitoring the opentelemetry components. |
| openTelemetry.prometheus.rules.additionalRuleLabels | string | nil | Additional labels for PrometheusRule alerts. |
| openTelemetry.prometheus.rules.annotations | object | {} | Annotations for PrometheusRules. |
| openTelemetry.prometheus.rules.create | bool | true | Enables PrometheusRule resources to be created. |
| openTelemetry.prometheus.rules.enabled | list | ["FilelogRefusedLogs","LogsOTelLogsMissing","LogsOTelLogsDecreasing","ReconcileErrors","ReceiverRefusedMetric","WorkqueueDepth"] | PrometheusRules to enable. |
| openTelemetry.prometheus.rules.labels | object | {} | Labels for PrometheusRules. |
| openTelemetry.prometheus.serviceMonitor | object | {"enabled":true} | Activates the service-monitoring for the Logs Collector. |
| openTelemetry.region | string | nil | Region label for Logging |
| opentelemetry-operator.admissionWebhooks.autoGenerateCert | object | {"recreate":false} | Activate to use Helm to create self-signed certificates. |
| opentelemetry-operator.admissionWebhooks.autoGenerateCert.recreate | bool | false | Activate to recreate the cert after a defined period (certPeriodDays default is 365). |
| opentelemetry-operator.admissionWebhooks.certManager | object | {"enabled":false} | Activate to use the CertManager for generating self-signed certificates. |
| opentelemetry-operator.admissionWebhooks.failurePolicy | string | "Ignore" | Defines if the admission webhooks should Ignore errors or Fail on errors when communicating with the API server. |
| opentelemetry-operator.crds.create | bool | false | If you want to use the upstream CRDs, set this variable to `true``. |
| opentelemetry-operator.enabled | bool | true | Set to true to enable the installation of the OpenTelemetry Operator. |
| opentelemetry-operator.kubeRBACProxy | object | {"enabled":false} | the kubeRBACProxy can be enabled to allow the operator perform RBAC authorization against the Kubernetes API. |
| opentelemetry-operator.manager.image.repository | string | "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator" | overrides the default image repository for the OpenTelemetry Operator image. |
| opentelemetry-operator.manager.image.tag | string | "v0.131.0" | overrides the default tag repository for the OpenTelemetry Operator image. |
| opentelemetry-operator.manager.serviceMonitor.enabled | bool | true | Enable serviceMonitor for Prometheus metrics scrape |
| opentelemetry-operator.manager.serviceMonitor.extraLabels | object | {} | Additional labels on the ServiceMonitor |
| testFramework.enabled | bool | true | Activates the Helm chart testing framework. |
| testFramework.image.registry | string | "ghcr.io" | Defines the image registry for the test framework. |
| testFramework.image.repository | string | "cloudoperators/greenhouse-extensions-integration-test" | Defines the image repository for the test framework. |
| testFramework.image.tag | string | "main" | Defines the image tag for the test framework. |
| testFramework.imagePullPolicy | string | "IfNotPresent" | Defines the image pull policy for the test framework. |
Examples
TBD
4.3.12 - Logshipper
This Plugin is intended for shipping container and systemd logs to an Elasticsearch/ OpenSearch cluster. It uses fluentbit to collect logs. The default configuration can be found under chart/templates/fluent-bit-configmap.yaml.
Components included in this Plugin:
Owner
- @ivogoman
Parameters
| Name | Description | Value |
|---|---|---|
fluent-bit.parser | Parser used for container logs. [docker|cri] labels | “cri” |
fluent-bit.backend.opensearch.host | Host for the Elastic/OpenSearch HTTP Input | |
fluent-bit.backend.opensearch.port | Port for the Elastic/OpenSearch HTTP Input | |
fluent-bit.backend.opensearch.http_user | Username for the Elastic/OpenSearch HTTP Input | |
fluent-bit.backend.opensearch.http_password | Password for the Elastic/OpenSearch HTTP Input | |
fluent-bit.backend.opensearch.host | Host for the Elastic/OpenSearch HTTP Input | |
fluent-bit.filter.additionalValues | list of Key-Value pairs to label logs labels | [] |
fluent-bit.customConfig.inputs | multi-line string containing additional inputs | |
fluent-bit.customConfig.filters | multi-line string containing additional filters | |
fluent-bit.customConfig.outputs | multi-line string containing additional outputs |
Custom Configuration
To add custom configuration to the fluent-bit configuration please check the fluentbit documentation here.
The fluent-bit.customConfig.inputs, fluent-bit.customConfig.filters and fluent-bit.customConfig.outputs parameters can be used to add custom configuration to the default configuration. The configuration should be added as a multi-line string.
Inputs are rendered after the default inputs, filters are rendered after the default filters and before the additional values are added. Outputs are rendered after the default outputs.
The additional values are added to all logs disregaring the source.
Example Input configuration:
fluent-bit:
config:
inputs: |
[INPUT]
Name tail-audit
Path /var/log/containers/greenhouse-controller*.log
Parser {{ default "cri" ( index .Values "fluent-bit" "parser" ) }}
Tag audit.*
Refresh_Interval 5
Mem_Buf_Limit 50MB
Skip_Long_Lines Off
Ignore_Older 1m
DB /var/log/fluent-bit-tail-audit.pos.db
Logs collected by the default configuration are prefixed with default_. In case that logs from additional inputs are to be send and processed by the same filters and outputs, the prefix should be used as well.
In case additional secrets are required the fluent-bit.env field can be used to add them to the environment of the fluent-bit container. The secrets should be created by adding them to the fluent-bit.backend field.
fluent-bit:
backend:
audit:
http_user: top-secret-audit
http_password: top-secret-audit
host: "audit.test"
tls:
enabled: true
verify: true
debug: false
4.3.13 - OpenSearch
OpenSearch Plugin
The OpenSearch plugin sets up an OpenSearch environment using the OpenSearch Operator, automating deployment, provisioning, management, and orchestration of OpenSearch clusters and dashboards. It functions as the backend for logs gathered by collectors such as OpenTelemetry collectors, enabling storage and visualization of logs for Greenhouse-onboarded Kubernetes clusters.
The main terminologies used in this document can be found in core-concepts.
Overview
OpenSearch is a distributed search and analytics engine designed for real-time log and event data analysis. The OpenSearch Operator simplifies the management of OpenSearch clusters by providing declarative APIs for configuration and scaling.
Components included in this Plugin:
- OpenSearch Operator
- OpenSearch Cluster Management
- OpenSearch Dashboards Deployment
- OpenSearch Index Management
- OpenSearch Security Configuration
Architecture

The OpenSearch Operator automates the management of OpenSearch clusters within a Kubernetes environment. The architecture consists of:
- OpenSearchCluster CRD: Defines the structure and configuration of OpenSearch clusters, including node roles, scaling policies, and version management.
- OpenSearchDashboards CRD: Manages OpenSearch Dashboards deployments, ensuring high availability and automatic upgrades.
- OpenSearchISMPolicy CRD: Implements index lifecycle management, defining policies for retention, rollover, and deletion.
- OpenSearchIndexTemplate CRD: Enables the definition of index mappings, settings, and template structures.
- Security Configuration via OpenSearchRole and OpenSearchUser: Manages authentication and authorization for OpenSearch users and roles.
Note
More configurations will be added over time, and contributions of custom configurations are highly appreciated. If you discover bugs or want to add functionality to the plugin, feel free to create a pull request.
Quick Start
This guide provides a quick and straightforward way to use OpenSearch as a Greenhouse Plugin on your Kubernetes cluster.
Prerequisites
- A running and Greenhouse-onboarded Kubernetes cluster. If you don’t have one, follow the Cluster onboarding guide.
- The OpenSearch Operator installed via Helm or Kubernetes manifests.
- An OpenTelemetry or similar log ingestion pipeline configured to send logs to OpenSearch.
Installation
Install via Greenhouse
- Navigate to the Greenhouse Dashboard.
- Select the OpenSearch plugin from the catalog.
- Specify the target cluster and configuration options.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| additionalRuleLabels | object | {} | Additional labels for PrometheusRule alerts |
| certManager.defaults.durations.ca | string | "8760h" | Validity period for CA certificates (1 year) |
| certManager.defaults.durations.leaf | string | "4800h" | Validity period for leaf certificates (200 days to comply with CA/B Forum baseline requirements) |
| certManager.defaults.privateKey.algorithm | string | "RSA" | Algorithm used for generating private keys |
| certManager.defaults.privateKey.encoding | string | "PKCS8" | Encoding format for private keys (PKCS8 recommended) |
| certManager.defaults.privateKey.size | int | 2048 | Key size in bits for RSA keys |
| certManager.defaults.usages | list | ["digital signature","key encipherment","server auth","client auth"] | List of extended key usages for certificates |
| certManager.enable | bool | true | Enable cert-manager integration for issuing TLS certificates |
| certManager.httpDnsNames | list | ["opensearch-client.tld"] | Override HTTP DNS names for OpenSearch client endpoints |
| certManager.issuer.ca | object | {"name":"opensearch-ca-issuer"} | Name of the CA Issuer to be used for internal certs |
| certManager.issuer.digicert | object | {} | API group for the DigicertIssuer custom resource |
| certManager.issuer.selfSigned | object | {"name":"opensearch-issuer"} | Name of the self-signed issuer used to sign the internal CA certificate |
| cluster.actionGroups | list | [] | List of OpensearchActionGroup. Check values.yaml file for examples. |
| cluster.cluster.annotations | object | {} | OpenSearchCluster annotations |
| cluster.cluster.bootstrap.additionalConfig | object | {} | bootstrap additional configuration, key-value pairs that will be added to the opensearch.yml configuration |
| cluster.cluster.bootstrap.affinity | object | {} | bootstrap pod affinity rules |
| cluster.cluster.bootstrap.jvm | string | "" | bootstrap pod jvm options. If jvm is not provided then the java heap size will be set to half of resources.requests.memory which is the recommend value for data nodes. If jvm is not provided and resources.requests.memory does not exist then value will be -Xmx512M -Xms512M |
| cluster.cluster.bootstrap.nodeSelector | object | {} | bootstrap pod node selectors |
| cluster.cluster.bootstrap.resources | object | {} | bootstrap pod cpu and memory resources |
| cluster.cluster.bootstrap.tolerations | list | [] | bootstrap pod tolerations |
| cluster.cluster.client.service.annotations | object | {} | Annotations to add to the service, e.g. disco. |
| cluster.cluster.client.service.enabled | bool | false | Enable or disable the external client service. |
| cluster.cluster.client.service.externalIPs | list | [] | List of external IPs to expose the service on. |
| cluster.cluster.client.service.loadBalancerSourceRanges | list | [] | List of allowed IP ranges for external access when service type is LoadBalancer. |
| cluster.cluster.client.service.ports | list | [{"name":"http","port":9200,"protocol":"TCP","targetPort":9200}] | Ports to expose for the client service. |
| cluster.cluster.client.service.type | string | "ClusterIP" | Kubernetes service type. Defaults to ClusterIP, but should be set to LoadBalancer to expose OpenSearch client nodes externally. |
| cluster.cluster.confMgmt.smartScaler | bool | true | Enable nodes to be safely removed from the cluster |
| cluster.cluster.dashboards.additionalConfig | object | {"opensearch.requestHeadersAllowlist":"[\"securitytenant\",\"Authorization\",\"x-forwarded-for\",\"x-forwarded-user\",\"x-forwarded-groups\",\"x-forwarded-email\"]","opensearch_security.auth.type":"proxy","opensearch_security.proxycache.roles_header":"x-forwarded-groups","opensearch_security.proxycache.user_header":"x-forwarded-user"} | Additional properties for opensearch_dashboards.yaml |
| cluster.cluster.dashboards.affinity | object | {} | dashboards pod affinity rules |
| cluster.cluster.dashboards.annotations | object | {} | dashboards annotations |
| cluster.cluster.dashboards.basePath | string | "" | dashboards Base Path for Opensearch Clusters running behind a reverse proxy |
| cluster.cluster.dashboards.enable | bool | true | Enable dashboards deployment |
| cluster.cluster.dashboards.env | list | [] | dashboards pod env variables |
| cluster.cluster.dashboards.image | string | "docker.io/opensearchproject/opensearch-dashboards" | dashboards image |
| cluster.cluster.dashboards.imagePullPolicy | string | "IfNotPresent" | dashboards image pull policy |
| cluster.cluster.dashboards.imagePullSecrets | list | [] | dashboards image pull secrets |
| cluster.cluster.dashboards.labels | object | {} | dashboards labels |
| cluster.cluster.dashboards.nodeSelector | object | {} | dashboards pod node selectors |
| cluster.cluster.dashboards.opensearchCredentialsSecret | object | {"name":"dashboards-credentials"} | Secret that contains fields username and password for dashboards to use to login to opensearch, must only be supplied if a custom securityconfig is provided |
| cluster.cluster.dashboards.pluginsList | list | [] | List of dashboards plugins to install |
| cluster.cluster.dashboards.podSecurityContext | object | {} | dasboards pod security context configuration |
| cluster.cluster.dashboards.replicas | int | 1 | number of dashboards replicas |
| cluster.cluster.dashboards.resources | object | {} | dashboards pod cpu and memory resources |
| cluster.cluster.dashboards.securityContext | object | {} | dashboards security context configuration |
| cluster.cluster.dashboards.service.labels | object | {} | dashboards service metadata labels |
| cluster.cluster.dashboards.service.loadBalancerSourceRanges | list | [] | source ranges for a loadbalancer |
| cluster.cluster.dashboards.service.type | string | "ClusterIP" | dashboards service type |
| cluster.cluster.dashboards.tls.caSecret | object | {"name":"opensearch-ca-cert"} | Secret that contains the ca certificate as ca.crt. If this and generate=true is set the existing CA cert from that secret is used to generate the node certs. In this case must contain ca.crt and ca.key fields |
| cluster.cluster.dashboards.tls.enable | bool | false | Enable HTTPS for dashboards |
| cluster.cluster.dashboards.tls.generate | bool | false | generate certificate, if false secret must be provided |
| cluster.cluster.dashboards.tls.secret | object | {"name":"opensearch-http-cert"} | Optional, name of a TLS secret that contains ca.crt, tls.key and tls.crt data. If ca.crt is in a different secret provide it via the caSecret field |
| cluster.cluster.dashboards.tolerations | list | [] | dashboards pod tolerations |
| cluster.cluster.dashboards.version | string | "3.2.0" | dashboards version |
| cluster.cluster.general.additionalConfig | object | {} | Extra items to add to the opensearch.yml |
| cluster.cluster.general.additionalVolumes | list | [] | Additional volumes to mount to all pods in the cluster. Supported volume types configMap, emptyDir, secret (with default Kubernetes configuration schema) |
| cluster.cluster.general.drainDataNodes | bool | true | Controls whether to drain data notes on rolling restart operations |
| cluster.cluster.general.httpPort | int | 9200 | Opensearch service http port |
| cluster.cluster.general.image | string | "docker.io/opensearchproject/opensearch" | Opensearch image |
| cluster.cluster.general.imagePullPolicy | string | "IfNotPresent" | Default image pull policy |
| cluster.cluster.general.keystore | list | [] | Populate opensearch keystore before startup |
| cluster.cluster.general.monitoring.enable | bool | true | Enable cluster monitoring |
| cluster.cluster.general.monitoring.labels | object | {} | ServiceMonitor labels |
| cluster.cluster.general.monitoring.monitoringUserSecret | string | "" | Secret with ‘username’ and ‘password’ keys for monitoring user. You could also use OpenSearchUser CRD instead of setting it. |
| cluster.cluster.general.monitoring.pluginUrl | string | "https://github.com/opensearch-project/opensearch-prometheus-exporter/releases/download/3.2.0.0/prometheus-exporter-3.2.0.0.zip" | Custom URL for the monitoring plugin |
| cluster.cluster.general.monitoring.scrapeInterval | string | "30s" | How often to scrape metrics |
| cluster.cluster.general.monitoring.tlsConfig | object | {"insecureSkipVerify":true} | Override the tlsConfig of the generated ServiceMonitor |
| cluster.cluster.general.pluginsList | list | [] | List of Opensearch plugins to install |
| cluster.cluster.general.podSecurityContext | object | {} | Opensearch pod security context configuration |
| cluster.cluster.general.securityContext | object | {} | Opensearch securityContext |
| cluster.cluster.general.serviceAccount | string | "" | Opensearch serviceAccount name. If Service Account doesn’t exist it could be created by setting serviceAccount.create and serviceAccount.name |
| cluster.cluster.general.serviceName | string | "" | Opensearch service name |
| cluster.cluster.general.setVMMaxMapCount | bool | true | Enable setVMMaxMapCount. OpenSearch requires the Linux kernel vm.max_map_count option to be set to at least 262144 |
| cluster.cluster.general.snapshotRepositories | list | [] | Opensearch snapshot repositories configuration |
| cluster.cluster.general.vendor | string | "Opensearch" | |
| cluster.cluster.general.version | string | "3.2.0" | Opensearch version |
| cluster.cluster.ingress.dashboards.annotations | object | {} | dashboards ingress annotations |
| cluster.cluster.ingress.dashboards.className | string | "" | Ingress class name |
| cluster.cluster.ingress.dashboards.enabled | bool | false | Enable ingress for dashboards service |
| cluster.cluster.ingress.dashboards.hosts | list | [] | Ingress hostnames |
| cluster.cluster.ingress.dashboards.tls | list | [] | Ingress tls configuration |
| cluster.cluster.ingress.opensearch.annotations | object | {} | Opensearch ingress annotations |
| cluster.cluster.ingress.opensearch.className | string | "" | Opensearch Ingress class name |
| cluster.cluster.ingress.opensearch.enabled | bool | false | Enable ingress for Opensearch service |
| cluster.cluster.ingress.opensearch.hosts | list | [] | Opensearch Ingress hostnames |
| cluster.cluster.ingress.opensearch.tls | list | [] | Opensearch tls configuration |
| cluster.cluster.initHelper.imagePullPolicy | string | "IfNotPresent" | initHelper image pull policy |
| cluster.cluster.initHelper.imagePullSecrets | list | [] | initHelper image pull secret |
| cluster.cluster.initHelper.resources | object | {} | initHelper pod cpu and memory resources |
| cluster.cluster.initHelper.version | string | "1.36" | initHelper version |
| cluster.cluster.labels | object | {} | OpenSearchCluster labels |
| cluster.cluster.name | string | "" | OpenSearchCluster name, by default release name is used |
| cluster.cluster.nodePools | list | nodePools: - component: main diskSize: “30Gi” replicas: 3 roles: - “cluster_manager” resources: requests: memory: “1Gi” cpu: “500m” limits: memory: “2Gi” cpu: 1 | Opensearch nodes configuration |
| cluster.cluster.security.config.adminCredentialsSecret | object | {"name":"admin-credentials"} | Secret that contains fields username and password to be used by the operator to access the opensearch cluster for node draining. Must be set if custom securityconfig is provided. |
| cluster.cluster.security.config.adminSecret | object | {"name":"opensearch-admin-cert"} | TLS Secret that contains a client certificate (tls.key, tls.crt, ca.crt) with admin rights in the opensearch cluster. Must be set if transport certificates are provided by user and not generated |
| cluster.cluster.security.config.securityConfigSecret | object | {"name":"opensearch-security-config"} | Secret that contains the differnt yml files of the opensearch-security config (config.yml, internal_users.yml, etc) |
| cluster.cluster.security.tls.http.caSecret | object | {"name":"opensearch-http-cert"} | Optional, secret that contains the ca certificate as ca.crt. If this and generate=true is set the existing CA cert from that secret is used to generate the node certs. In this case must contain ca.crt and ca.key fields |
| cluster.cluster.security.tls.http.generate | bool | false | If set to true the operator will generate a CA and certificates for the cluster to use, if false - secrets with existing certificates must be supplied |
| cluster.cluster.security.tls.http.secret | object | {"name":"opensearch-http-cert"} | Optional, name of a TLS secret that contains ca.crt, tls.key and tls.crt data. If ca.crt is in a different secret provide it via the caSecret field |
| cluster.cluster.security.tls.transport.adminDn | list | ["CN=admin"] | DNs of certificates that should have admin access, mainly used for securityconfig updates via securityadmin.sh, only used when existing certificates are provided |
| cluster.cluster.security.tls.transport.caSecret | object | {"name":"opensearch-ca-cert"} | Optional, secret that contains the ca certificate as ca.crt. If this and generate=true is set the existing CA cert from that secret is used to generate the node certs. In this case must contain ca.crt and ca.key fields |
| cluster.cluster.security.tls.transport.generate | bool | false | If set to true the operator will generate a CA and certificates for the cluster to use, if false secrets with existing certificates must be supplied |
| cluster.cluster.security.tls.transport.nodesDn | list | ["CN=opensearch-transport"] | Allowed Certificate DNs for nodes, only used when existing certificates are provided |
| cluster.cluster.security.tls.transport.perNode | bool | false | Separate certificate per node |
| cluster.cluster.security.tls.transport.secret | object | {"name":"opensearch-transport-cert"} | Optional, name of a TLS secret that contains ca.crt, tls.key and tls.crt data. If ca.crt is in a different secret provide it via the caSecret field |
| cluster.componentTemplates | list | componentTemplates: - name: logs-attributes-dynamic version: 1 allowAutoCreate: true _meta: description: “Enable full dynamic mapping for all attributes.* keys” templateSpec: mappings: properties: attributes: type: object dynamic: true | List of OpensearchComponentTemplate. Check values.yaml file for examples. |
| cluster.fullnameOverride | string | "" | |
| cluster.indexTemplates | list | indexTemplates: - name: “logs-index-template” indexPatterns: - “logs*" composedOf: - logs-attributes-dynamic templateSpec: settings: index: number_of_shards: 1 number_of_replicas: 1 refresh_interval: 1s mappings: properties: “@timestamp”: type: date message: type: text dataStream: {} priority: 100 | List of OpensearchIndexTemplate. |
| cluster.ismPolicies | list | ismPolicies: - name: logs-rollover-policy defaultState: hot description: “Logs policy with 7-day retention and size-based rollover” states: - name: hot actions: - rollover: minSize: “10gb” minDocCount: 20000000 transitions: - stateName: delete conditions: minIndexAge: “7d” - name: delete actions: - delete: {} ismTemplate: indexPatterns: - “logs*" priority: 100 | List of OpenSearchISMPolicy. Check values.yaml file for examples. |
| cluster.nameOverride | string | "" | |
| cluster.roles | list | roles: - name: “logs-write-role” clusterPermissions: - “cluster_monitor” indexPermissions: - indexPatterns: - “logs*" allowedActions: - “indices:admin/template/get” | List of OpensearchRole. See values.yaml file for a full example. |
| cluster.serviceAccount.annotations | object | {} | Service Account annotations |
| cluster.serviceAccount.create | bool | false | Create Service Account |
| cluster.serviceAccount.name | string | "" | Service Account name. Set general.serviceAccount to use this Service Account for the Opensearch cluster |
| cluster.tenants | list | [] | List of additional tenants. Check values.yaml file for examples. |
| cluster.users | list | users: - name: “logs” secretName: “logs-credentials” secretKey: “password” backendRoles: [] | List of OpenSearch user configurations. |
| cluster.usersCredentials | object | usersCredentials: admin: username: “admin” password: “admin” hash: “" | List of OpenSearch user credentials. These credentials are used for authenticating users with OpenSearch. See values.yaml file for a full example. |
| cluster.usersRoleBinding | list | usersRoleBinding: - name: “logs-write” users: - “logs” - “logs2” roles: - “logs-write-role” | Allows to link any number of users, backend roles and roles with a OpensearchUserRoleBinding. Each user in the binding will be granted each role |
| operator.fullnameOverride | string | "" | |
| operator.installCRDs | bool | false | |
| operator.kubeRbacProxy.enable | bool | true | |
| operator.kubeRbacProxy.image.repository | string | "quay.io/brancz/kube-rbac-proxy" | |
| operator.kubeRbacProxy.image.tag | string | "v0.19.1" | |
| operator.kubeRbacProxy.livenessProbe.failureThreshold | int | 3 | |
| operator.kubeRbacProxy.livenessProbe.httpGet.path | string | "/healthz" | |
| operator.kubeRbacProxy.livenessProbe.httpGet.port | int | 10443 | |
| operator.kubeRbacProxy.livenessProbe.httpGet.scheme | string | "HTTPS" | |
| operator.kubeRbacProxy.livenessProbe.initialDelaySeconds | int | 10 | |
| operator.kubeRbacProxy.livenessProbe.periodSeconds | int | 15 | |
| operator.kubeRbacProxy.livenessProbe.successThreshold | int | 1 | |
| operator.kubeRbacProxy.livenessProbe.timeoutSeconds | int | 3 | |
| operator.kubeRbacProxy.readinessProbe.failureThreshold | int | 3 | |
| operator.kubeRbacProxy.readinessProbe.httpGet.path | string | "/healthz" | |
| operator.kubeRbacProxy.readinessProbe.httpGet.port | int | 10443 | |
| operator.kubeRbacProxy.readinessProbe.httpGet.scheme | string | "HTTPS" | |
| operator.kubeRbacProxy.readinessProbe.initialDelaySeconds | int | 10 | |
| operator.kubeRbacProxy.readinessProbe.periodSeconds | int | 15 | |
| operator.kubeRbacProxy.readinessProbe.successThreshold | int | 1 | |
| operator.kubeRbacProxy.readinessProbe.timeoutSeconds | int | 3 | |
| operator.kubeRbacProxy.resources.limits.cpu | string | "50m" | |
| operator.kubeRbacProxy.resources.limits.memory | string | "50Mi" | |
| operator.kubeRbacProxy.resources.requests.cpu | string | "25m" | |
| operator.kubeRbacProxy.resources.requests.memory | string | "25Mi" | |
| operator.kubeRbacProxy.securityContext.allowPrivilegeEscalation | bool | false | |
| operator.kubeRbacProxy.securityContext.capabilities.drop[0] | string | "ALL" | |
| operator.kubeRbacProxy.securityContext.readOnlyRootFilesystem | bool | true | |
| operator.manager.dnsBase | string | "cluster.local" | |
| operator.manager.extraEnv | list | [] | |
| operator.manager.image.pullPolicy | string | "Always" | |
| operator.manager.image.repository | string | "opensearchproject/opensearch-operator" | |
| operator.manager.image.tag | string | "" | |
| operator.manager.imagePullSecrets | list | [] | |
| operator.manager.livenessProbe.failureThreshold | int | 3 | |
| operator.manager.livenessProbe.httpGet.path | string | "/healthz" | |
| operator.manager.livenessProbe.httpGet.port | int | 8081 | |
| operator.manager.livenessProbe.initialDelaySeconds | int | 10 | |
| operator.manager.livenessProbe.periodSeconds | int | 15 | |
| operator.manager.livenessProbe.successThreshold | int | 1 | |
| operator.manager.livenessProbe.timeoutSeconds | int | 3 | |
| operator.manager.loglevel | string | "debug" | |
| operator.manager.parallelRecoveryEnabled | bool | true | |
| operator.manager.pprofEndpointsEnabled | bool | false | |
| operator.manager.readinessProbe.failureThreshold | int | 3 | |
| operator.manager.readinessProbe.httpGet.path | string | "/readyz" | |
| operator.manager.readinessProbe.httpGet.port | int | 8081 | |
| operator.manager.readinessProbe.initialDelaySeconds | int | 10 | |
| operator.manager.readinessProbe.periodSeconds | int | 15 | |
| operator.manager.readinessProbe.successThreshold | int | 1 | |
| operator.manager.readinessProbe.timeoutSeconds | int | 3 | |
| operator.manager.resources.limits.cpu | string | "200m" | |
| operator.manager.resources.limits.memory | string | "500Mi" | |
| operator.manager.resources.requests.cpu | string | "100m" | |
| operator.manager.resources.requests.memory | string | "350Mi" | |
| operator.manager.securityContext.allowPrivilegeEscalation | bool | false | |
| operator.manager.watchNamespace | string | nil | |
| operator.nameOverride | string | "" | |
| operator.namespace | string | "" | |
| operator.nodeSelector | object | {} | |
| operator.podAnnotations | object | {} | |
| operator.podLabels | object | {} | |
| operator.priorityClassName | string | "" | |
| operator.securityContext.runAsNonRoot | bool | true | |
| operator.serviceAccount.create | bool | true | |
| operator.serviceAccount.name | string | "opensearch-operator-controller-manager" | |
| operator.tolerations | list | [] | |
| operator.useRoleBindings | bool | false | |
| testFramework.enabled | bool | true | Activates the Helm chart testing framework. |
| testFramework.image.registry | string | "ghcr.io" | Defines the image registry for the test framework. |
| testFramework.image.repository | string | "cloudoperators/greenhouse-extensions-integration-test" | Defines the image repository for the test framework. |
| testFramework.image.tag | string | "main" | Defines the image tag for the test framework. |
| testFramework.imagePullPolicy | string | "IfNotPresent" | Defines the image pull policy for the test framework. |
Usage
Once deployed, OpenSearch can be accessed via OpenSearch Dashboards.
kubectl port-forward svc/opensearch-dashboards 5601:5601
Visit http://localhost:5601 in your browser and log in using the configured credentials.
Conclusion
This guide ensures that OpenSearch is fully integrated into the Greenhouse ecosystem, providing scalable log management and visualization. Additional custom configurations can be introduced to meet specific operational needs.
For troubleshooting and further details, check out the OpenSearch documentation.
4.3.14 - Perses
Table of Contents
- Table of Contents
- Overview
- Disclaimer
- Quick Start
- Configuration
- Create a custom dashboard
- Add Dashboards as ConfigMaps
Learn more about the Perses Plugin. Use it to visualize Prometheus/Thanos metrics for your Greenhouse remote cluster.
The main terminologies used in this document can be found in core-concepts.
Overview
Observability is often required for the operation and automation of service offerings. Perses is a CNCF project and it aims to become an open-standard for dashboards and visualization. It provides you with tools to display Prometheus metrics on live dashboards with insightful charts and visualizations. In the Greenhouse context, this complements the kube-monitoring plugin, which automatically acts as a Perses data source which is recognized by Perses. In addition, the Plugin provides a mechanism that automates the lifecycle of datasources and dashboards without having to restart Perses.

Disclaimer
This is not meant to be a comprehensive package that covers all scenarios. If you are an expert, feel free to configure the Plugin according to your needs.
Contribution is highly appreciated. If you discover bugs or want to add functionality to the plugin, then pull requests are always welcome.
Quick Start
This guide provides a quick and straightforward way how to use Perses as a Greenhouse Plugin on your Kubernetes cluster.
Prerequisites
- A running and Greenhouse-managed Kubernetes remote cluster
kube-monitoringPlugin will integrate into Perses automatically with its own datasourcethanosPlugin can be enabled alongsidekube-monitoring. Perses then will have both datasources (thanos,kube-monitoring) and will default tothanosto provide access to long term metrics
The plugin works by default with anonymous access enabled. This plugin comes with some default dashboards and datasources will be automatically discovered by the plugin.
Step 1: Add your dashboards and datasources
Dashboards are selected from ConfigMaps across namespaces. The plugin searches for ConfigMaps with the label perses.dev/resource: "true" and imports them into Perses. The ConfigMap must contain a key like my-dashboard.json with the dashboard JSON content. Please refer this section for more information.
A guide on how to create custom dashboards on the UI can be found here.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| global.commonLabels | object | {} | Labels to add to all resources. This can be used to add a support_group or service label to all resources and alerting rules. |
| greenhouse.alertLabels | object | alertLabels: support_group: “default” meta: “" | Labels to add to the PrometheusRules alerts. |
| greenhouse.defaultDashboards.enabled | bool | true | By setting this to true, You will get Perses Self-monitoring dashboards |
| perses.additionalLabels | object | {} | |
| perses.annotations | object | {} | Statefulset Annotations |
| perses.config.annotations | object | {} | Annotations for config |
| perses.config.api_prefix | string | "/perses" | |
| perses.config.database | object | database: file: folder: /perses extension: json | Database configuration based on database type |
| perses.config.database.file | object | {"extension":"json","folder":"/perses"} | file system configs |
| perses.config.frontend.important_dashboards | list | [] | |
| perses.config.frontend.information | string | "# Welcome to Perses!\n\n**Perses is now the default visualization plugin** for Greenhouse platform and will replace Plutono for the visualization of Prometheus and Thanos metrics.\n\n## Documentation\n\n- [Perses Official Documentation](https://perses.dev/)\n- [Perses Greenhouse Plugin Guide](https://cloudoperators.github.io/greenhouse/docs/reference/catalog/perses/)\n- [Create a Custom Dashboard](https://cloudoperators.github.io/greenhouse/docs/reference/catalog/perses/#create-a-custom-dashboard)" | Information contains markdown content to be displayed on the Perses home page. |
| perses.config.provisioning | object | provisioning: folders: - /etc/perses/provisioning interval: 3m | provisioning config |
| perses.config.security.cookie | object | cookie: same_site: lax secure: false | cookie config |
| perses.config.security.enable_auth | bool | false | Enable Authentication |
| perses.config.security.readonly | bool | false | Configure Perses instance as readonly |
| perses.envVars | list | [] | Perses configuration as environment variables. |
| perses.envVarsExternalSecretName | string | "" | Name of existing Kubernetes Secret containing environment variables. When specified, no new Secret is created and values from envVars array are ignored. |
| perses.extraObjects | list | [] | Deploy extra K8s manifests |
| perses.fullnameOverride | string | "" | Override fully qualified app name |
| perses.image | object | image: name: “persesdev/perses” version: “" pullPolicy: IfNotPresent | Image of Perses |
| perses.image.name | string | "persesdev/perses" | Perses image repository and name |
| perses.image.pullPolicy | string | "IfNotPresent" | Default image pull policy |
| perses.image.version | string | "" | Overrides the image tag whose default is the chart appVersion. |
| perses.ingress | object | ingress: enabled: false hosts: - host: perses.local paths: - path: / pathType: Prefix ingressClassName: “" annotations: {} tls: [] | Configure the ingress resource that allows you to access Perses Frontend ref: https://kubernetes.io/docs/concepts/services-networking/ingress/ |
| perses.ingress.annotations | object | {} | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. For a full list of possible ingress annotations, please see ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md |
| perses.ingress.enabled | bool | false | Enable ingress controller resource |
| perses.ingress.hosts | list | hosts: - host: perses.local paths: - path: / pathType: Prefix | Default host for the ingress resource |
| perses.ingress.ingressClassName | string | "" | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster . ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/ |
| perses.ingress.tls | list | [] | Ingress TLS configuration |
| perses.livenessProbe | object | livenessProbe: enabled: true initialDelaySeconds: 10 periodSeconds: 60 timeoutSeconds: 5 successThreshold: 1 failureThreshold: 5 | Liveness probe configuration Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ |
| perses.logLevel | string | "warning" | Log level for Perses be configured in available options “panic”, “error”, “warning”, “info”, “debug”, “trace” |
| perses.nameOverride | string | "" | Override name of the chart used in Kubernetes object names. |
| perses.ociArtifacts | object | {} | OCI artifacts configuration for mounting OCI images as volumes. For more information, refer https://perses.dev/helm-charts/docs/packaging-resources-as-oci-artifacts/ |
| perses.persistence | object | persistence: enabled: false accessModes: - ReadWriteOnce size: 8Gi securityContext: fsGroup: 2000 labels: {} annotations: {} | Persistence parameters |
| perses.persistence.accessModes | list | ["ReadWriteOnce"] | PVC Access Modes for data volume |
| perses.persistence.annotations | object | {} | Annotations for the PVC |
| perses.persistence.enabled | bool | false | If disabled, it will use a emptydir volume |
| perses.persistence.labels | object | {} | Labels for the PVC |
| perses.persistence.securityContext | object | {"fsGroup":2000} | Security context for the PVC when persistence is enabled |
| perses.persistence.size | string | "8Gi" | PVC Storage Request for data volume |
| perses.provisioningPersistence | object | {"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":false,"labels":{},"size":"1Gi","storageClass":""} | Persistence configuration for Perses provisioning. For more information on provisioning feature, see: https://perses.dev/perses/docs/configuration/provisioning/ When enabled, a PersistentVolumeClaim (PVC) is created via StatefulSet volumeClaimTemplates. The PVC will be named: provisioning-- Examples: - Release “perses-oci” → PVC: “provisioning-perses-oci-0” - Release “my-app” → PVC: “provisioning-my-app-perses-0” This PVC can be referenced by other workloads (e.g., CronJobs) to write dashboards/datasources. |
| perses.provisioningPersistence.accessModes | list | ["ReadWriteOnce"] | access modes for provisioning PVC ReadWriteOnce: Only one pod can mount (cheaper, single-node storage) ReadWriteMany: Multiple pods can mount simultaneously (required for CronJobs or multiple replicas) Note: ReadWriteMany requires storage class that supports it (e.g., NFS, CephFS, Azure Files) |
| perses.provisioningPersistence.annotations | object | {} | annotations for provisioning PVC |
| perses.provisioningPersistence.enabled | bool | false | enable persistent volume for provisioning |
| perses.provisioningPersistence.labels | object | {} | labels for provisioning PVC |
| perses.provisioningPersistence.size | string | "1Gi" | size of provisioning PVC |
| perses.provisioningPersistence.storageClass | string | "" | storage class for provisioning PVC |
| perses.readinessProbe | object | readinessProbe: enabled: true initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds: 5 successThreshold: 1 failureThreshold: 5 | Readiness probe configuration Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ |
| perses.replicas | int | 1 | Number of pod replicas. |
| perses.resources | object | resources: limits: cpu: 250m memory: 500Mi requests: cpu: 250m memory: 500Mi | Resource limits & requests. Update according to your own use case as these values might be too low for a typical deployment. ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
| perses.service | object | service: annotations: {} labels: greenhouse.sap/expose: “true” type: “ClusterIP” portName: http port: 8080 targetPort: 8080 | Expose the Perses service to be accessed from outside the cluster (LoadBalancer service). or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it. |
| perses.service.annotations | object | {"greenhouse.sap/expose":"true"} | Annotations to add to the service |
| perses.service.labels | object | {"greenhouse.sap/expose":"true"} | Labeles to add to the service |
| perses.service.port | int | 8080 | Service Port |
| perses.service.portName | string | "http" | Service Port Name |
| perses.service.targetPort | int | 8080 | Perses running port |
| perses.service.type | string | "ClusterIP" | Service Type |
| perses.serviceAccount | object | serviceAccount: create: true annotations: {} name: “" | Service account for Perses to use. |
| perses.serviceAccount.annotations | object | {} | Annotations to add to the service account |
| perses.serviceAccount.create | bool | true | Specifies whether a service account should be created |
| perses.serviceAccount.name | string | "" | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| perses.serviceMonitor.interval | string | "30s" | Interval for the serviceMonitor |
| perses.serviceMonitor.labels | object | {} | Labels to add to the ServiceMonitor so that Prometheus can discover it. These labels should match the ‘serviceMonitorSelector.matchLabels’ and ruleSelector.matchLabels defined in your Prometheus CR. |
| perses.serviceMonitor.selector.matchLabels | object | {} | Selector used by the ServiceMonitor to find which Perses service to scrape metrics from. These matchLabels should match the labels on your Perses service. |
| perses.serviceMonitor.selfMonitor | bool | false | Create a serviceMonitor for Perses |
| perses.sidecar | object | sidecar: enabled: true label: “perses.dev/resource” labelValue: “true” allNamespaces: true extraEnvVars: [] enableSecretAccess: false | Sidecar configuration that watches for ConfigMaps with the specified label/labelValue and loads them into Perses provisioning |
| perses.sidecar.allNamespaces | bool | true | check for configmaps from all namespaces. When set to false, it will only check for configmaps in the same namespace as the Perses instance |
| perses.sidecar.enableSecretAccess | bool | false | Enable secret access permissions in the cluster role. When enabled, the sidecar will have permissions to read secrets and use them. |
| perses.sidecar.enabled | bool | true | Enable the sidecar container for ConfigMap provisioning |
| perses.sidecar.extraEnvVars | list | [] | add additional environment variables to sidecar container. you can look at the k8s-sidecar documentation for more information - https://github.com/kiwigrid/k8s-sidecar |
| perses.sidecar.label | string | "perses.dev/resource" | Label key to watch for ConfigMaps containing Perses resources |
| perses.sidecar.labelValue | string | "true" | Label value to watch for ConfigMaps containing Perses resources |
| perses.tls | object | tls: enabled: false caCert: enabled: false secretName: “" mountPath: “/ca” clientCert: enabled: false secretName: “" mountPath: “/tls” | TLS configuration for mounting certificates from Kubernetes secrets |
| perses.tls.caCert | object | caCert: enabled: false secretName: “" mountPath: “/ca” | CA Certificate configuration Certificates will be mounted to the directory specified in mountPath |
| perses.tls.caCert.enabled | bool | false | Enable CA certificate mounting |
| perses.tls.caCert.mountPath | string | "/ca" | Mount path for the CA certificate directory |
| perses.tls.caCert.secretName | string | "" | Name of the Kubernetes secret containing the CA certificate Defaults to “release-name-tls” if not specified |
| perses.tls.clientCert | object | clientCert: enabled: false secretName: “" mountPath: “/tls” | Client Certificate configuration (contains both cert and key) Certificates will be mounted to the directory specified in mountPath |
| perses.tls.clientCert.enabled | bool | false | Enable client certificate mounting |
| perses.tls.clientCert.mountPath | string | "/tls" | Mount path for the client certificate directory |
| perses.tls.clientCert.secretName | string | "" | Name of the Kubernetes secret containing the client certificate and key Defaults to “release-name-tls” if not specified |
| perses.tls.enabled | bool | false | Enable TLS certificate mounting |
| perses.volumeMounts | list | [] | Additional VolumeMounts on the output StatefulSet definition. |
| perses.volumes | list | [] | Additional volumes on the output StatefulSet definition. |
Create a custom dashboard
- Add a new Project by clicking on ADD PROJECT in the top right corner. Give it a name and click Add.
- Add a new dashboard by clicking on ADD DASHBOARD. Give it a name and click Add.
- Now you can add variables, panels to your dashboard.
- You can group your panels by adding the panels to a Panel Group.
- Move and resize the panels as needed.
- Watch this gif to learn more.
- You do not need to add the kube-monitoring datasource manually. It will be automatically discovered by Perses.
- Click Save after you have made changes.
- Export the dashboard.
- Click on the {} icon in the top right corner of the dashboard.
- Copy the entire JSON model.
- See the next section for detailed instructions on how and where to paste the copied dashboard JSON model.
Dashboard-as-Code
Perses offers the possibility to define dashboards as code (DaC) instead of going through manipulations on the UI. But why would you want to do this? Basically Dashboard-as-Code (DaC) is something that becomes useful at scale, when you have many dashboards to maintain, to keep aligned on certain parts, etc. If you are interested in this, you can check the Perses documentation for more information.
Add Dashboards as ConfigMaps
By default, a sidecar container is deployed in the Perses pod. This container watches all configmaps in the cluster and filters out the ones with a label perses.dev/resource: "true". The files defined in those configmaps are written to a folder and this folder is accessed by Perses. Changes to the configmaps are continuously monitored and are reflected in Perses within 10 minutes.
A recommendation is to use one configmap per dashboard. This way, you can easily manage the dashboards in your git repository.
Recommended folder structure
Folder structure:
dashboards/
├── dashboard1.json
├── dashboard2.json
├── prometheusdatasource1.json
├── prometheusdatasource2.json
templates/
├──dashboard-json-configmap.yaml
Helm template to create a configmap for each dashboard:
{{- range $path, $bytes := .Files.Glob "dashboards/*.json" }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-%s" $.Release.Name $path | replace "/" "-" | trunc 63 }}
labels:
perses.dev/resource: "true"
data:
{{ printf "%s: |-" $path | replace "/" "-" | indent 2 }}
{{ printf "%s" $bytes | indent 4 }}
{{- end }}
4.3.15 - Plutono
Learn more about the plutono Plugin. Use it to install the web dashboarding system Plutono to collect, correlate, and visualize Prometheus metrics for your Greenhouse cluster.
The main terminologies used in this document can be found in core-concepts.
Overview
Observability is often required for the operation and automation of service offerings. Plutono provides you with tools to display Prometheus metrics on live dashboards with insightful charts and visualizations. In the Greenhouse context, this complements the kube-monitoring plugin, which automatically acts as a Plutono data source which is recognized by Plutono. In addition, the Plugin provides a mechanism that automates the lifecycle of datasources and dashboards without having to restart Plutono.

Disclaimer
This is not meant to be a comprehensive package that covers all scenarios. If you are an expert, feel free to configure the Plugin according to your needs.
Contribution is highly appreciated. If you discover bugs or want to add functionality to the plugin, then pull requests are always welcome.
Quick Start
This guide provides a quick and straightforward way how to use Plutono as a Greenhouse Plugin on your Kubernetes cluster.
Prerequisites
- A running and Greenhouse-managed Kubernetes cluster
kube-monitoringPlugin installed to have at least one Prometheus instance running in the cluster
The plugin works by default with anonymous access enabled. If you use the standard configuration in the kube-monitoring plugin, the data source and some kubernetes-operations dashboards are already pre-installed.
Step 1: Add your dashboards
Dashboards are selected from ConfigMaps across namespaces. The plugin searches for ConfigMaps with the label plutono-dashboard: "true" and imports them into Plutono. The ConfigMap must contain a key like my-dashboard.json with the dashboard JSON content. Example
A guide on how to create dashboards can be found here.
Step 2: Add your datasources
Data sources are selected from Secrets across namespaces. The plugin searches for Secrets with the label plutono-dashboard: "true" and imports them into Plutono. The Secrets should contain valid datasource configuration YAML. Example
Values
| Key | Type | Default | Description |
|---|---|---|---|
| global.imagePullSecrets | list | [] | To help compatibility with other charts which use global.imagePullSecrets. Allow either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style). Can be templated. global: imagePullSecrets: - name: pullSecret1 - name: pullSecret2 or global: imagePullSecrets: - pullSecret1 - pullSecret2 |
| global.imageRegistry | string | nil | Overrides the Docker registry globally for all images |
| plutono.“plutono.ini”.“auth.anonymous”.enabled | bool | true | |
| plutono.“plutono.ini”.“auth.anonymous”.org_role | string | "Admin" | |
| plutono.“plutono.ini”.auth.disable_login_form | bool | true | |
| plutono.“plutono.ini”.log.mode | string | "console" | |
| plutono.“plutono.ini”.paths.data | string | "/var/lib/plutono/" | |
| plutono.“plutono.ini”.paths.logs | string | "/var/log/plutono" | |
| plutono.“plutono.ini”.paths.plugins | string | "/var/lib/plutono/plugins" | |
| plutono.“plutono.ini”.paths.provisioning | string | "/etc/plutono/provisioning" | |
| plutono.admin.existingSecret | string | "" | |
| plutono.admin.passwordKey | string | "admin-password" | |
| plutono.admin.userKey | string | "admin-user" | |
| plutono.adminPassword | string | "strongpassword" | |
| plutono.adminUser | string | "admin" | |
| plutono.affinity | object | {} | Affinity for pod assignment (evaluated as template) ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity |
| plutono.alerting | object | {} | |
| plutono.assertNoLeakedSecrets | bool | true | |
| plutono.automountServiceAccountToken | bool | true | Should the service account be auto mounted on the pod |
| plutono.autoscaling | object | {"behavior":{},"enabled":false,"maxReplicas":5,"minReplicas":1,"targetCPU":"60","targetMemory":""} | Create HorizontalPodAutoscaler object for deployment type |
| plutono.containerSecurityContext.allowPrivilegeEscalation | bool | false | |
| plutono.containerSecurityContext.capabilities.drop[0] | string | "ALL" | |
| plutono.containerSecurityContext.seccompProfile.type | string | "RuntimeDefault" | |
| plutono.createConfigmap | bool | true | Enable creating the plutono configmap |
| plutono.dashboardProviders | object | {} | |
| plutono.dashboards | object | {} | |
| plutono.dashboardsConfigMaps | object | {} | |
| plutono.datasources | object | {} | |
| plutono.deploymentStrategy | object | {"type":"RollingUpdate"} | See kubectl explain deployment.spec.strategy for more # ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy |
| plutono.dnsConfig | object | {} | |
| plutono.dnsPolicy | string | nil | dns configuration for pod |
| plutono.downloadDashboards.env | object | {} | |
| plutono.downloadDashboards.envFromSecret | string | "" | |
| plutono.downloadDashboards.envValueFrom | object | {} | |
| plutono.downloadDashboards.resources | object | {} | |
| plutono.downloadDashboards.securityContext.allowPrivilegeEscalation | bool | false | |
| plutono.downloadDashboards.securityContext.capabilities.drop[0] | string | "ALL" | |
| plutono.downloadDashboards.securityContext.seccompProfile.type | string | "RuntimeDefault" | |
| plutono.downloadDashboardsImage.pullPolicy | string | "IfNotPresent" | |
| plutono.downloadDashboardsImage.registry | string | "docker.io" | The Docker registry |
| plutono.downloadDashboardsImage.repository | string | "curlimages/curl" | |
| plutono.downloadDashboardsImage.sha | string | "" | |
| plutono.downloadDashboardsImage.tag | string | "8.14.1" | |
| plutono.enableKubeBackwardCompatibility | bool | false | Enable backward compatibility of kubernetes where version below 1.13 doesn’t have the enableServiceLinks option |
| plutono.enableServiceLinks | bool | true | |
| plutono.env | object | {} | |
| plutono.envFromConfigMaps | list | [] | The names of conifgmaps in the same kubernetes namespace which contain values to be added to the environment Each entry should contain a name key, and can optionally specify whether the configmap must be defined with an optional key. Name is templated. ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#configmapenvsource-v1-core |
| plutono.envFromSecret | string | "" | The name of a secret in the same kubernetes namespace which contain values to be added to the environment This can be useful for auth tokens, etc. Value is templated. |
| plutono.envFromSecrets | list | [] | The names of secrets in the same kubernetes namespace which contain values to be added to the environment Each entry should contain a name key, and can optionally specify whether the secret must be defined with an optional key. Name is templated. |
| plutono.envRenderSecret | object | {} | Sensible environment variables that will be rendered as new secret object This can be useful for auth tokens, etc. If the secret values contains “{{”, they’ll need to be properly escaped so that they are not interpreted by Helm ref: https://helm.sh/docs/howto/charts_tips_and_tricks/#using-the-tpl-function |
| plutono.envValueFrom | object | {} | |
| plutono.extraConfigmapMounts | list | [] | Values are templated. |
| plutono.extraContainerVolumes | list | [] | Volumes that can be used in init containers that will not be mounted to deployment pods |
| plutono.extraContainers | string | "" | Enable an Specify container in extraContainers. This is meant to allow adding an authentication proxy to a plutono pod |
| plutono.extraEmptyDirMounts | list | [] | |
| plutono.extraExposePorts | list | [] | |
| plutono.extraInitContainers | list | [] | Additional init containers (evaluated as template) ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ |
| plutono.extraLabels | object | {"plugin":"plutono"} | Apply extra labels to common labels. |
| plutono.extraObjects | list | [] | Create a dynamic manifests via values: |
| plutono.extraSecretMounts | list | [] | The additional plutono server secret mounts Defines additional mounts with secrets. Secrets must be manually created in the namespace. |
| plutono.extraVolumeMounts | list | [] | The additional plutono server volume mounts Defines additional volume mounts. |
| plutono.extraVolumes | list | [] | |
| plutono.gossipPortName | string | "gossip" | |
| plutono.headlessService | bool | false | Create a headless service for the deployment |
| plutono.hostAliases | list | [] | overrides pod.spec.hostAliases in the plutono deployment’s pods |
| plutono.image.pullPolicy | string | "IfNotPresent" | |
| plutono.image.pullSecrets | list | [] | Optionally specify an array of imagePullSecrets. # Secrets must be manually created in the namespace. # ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ # Can be templated. # |
| plutono.image.registry | string | "ghcr.io" | |
| plutono.image.repository | string | "credativ/plutono" | |
| plutono.image.sha | string | "" | |
| plutono.image.tag | string | "v7.5.39" | Overrides the Plutono image tag whose default is the chart appVersion |
| plutono.ingress.annotations | object | {} | |
| plutono.ingress.enabled | bool | false | |
| plutono.ingress.extraPaths | list | [] | Extra paths to prepend to every host configuration. This is useful when working with annotation based services. |
| plutono.ingress.hosts[0] | string | "chart-example.local" | |
| plutono.ingress.labels | object | {} | |
| plutono.ingress.path | string | "/" | |
| plutono.ingress.pathType | string | "Prefix" | pathType is only for k8s >= 1.1= |
| plutono.ingress.tls | list | [] | |
| plutono.lifecycleHooks | object | {} | |
| plutono.livenessProbe.failureThreshold | int | 10 | |
| plutono.livenessProbe.httpGet.path | string | "/api/health" | |
| plutono.livenessProbe.httpGet.port | int | 3000 | |
| plutono.livenessProbe.initialDelaySeconds | int | 60 | |
| plutono.livenessProbe.timeoutSeconds | int | 30 | |
| plutono.namespaceOverride | string | "" | |
| plutono.networkPolicy.allowExternal | bool | true | @param networkPolicy.ingress When true enables the creation # an ingress network policy # |
| plutono.networkPolicy.egress.blockDNSResolution | bool | false | @param networkPolicy.egress.blockDNSResolution When enabled, DNS resolution will be blocked # for all pods in the plutono namespace. |
| plutono.networkPolicy.egress.enabled | bool | false | @param networkPolicy.egress.enabled When enabled, an egress network policy will be # created allowing plutono to connect to external data sources from kubernetes cluster. |
| plutono.networkPolicy.egress.ports | list | [] | @param networkPolicy.egress.ports Add individual ports to be allowed by the egress |
| plutono.networkPolicy.egress.to | list | [] | |
| plutono.networkPolicy.enabled | bool | false | @param networkPolicy.enabled Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now. # |
| plutono.networkPolicy.explicitNamespacesSelector | object | {} | @param networkPolicy.explicitNamespacesSelector A Kubernetes LabelSelector to explicitly select namespaces from which traffic could be allowed # If explicitNamespacesSelector is missing or set to {}, only client Pods that are in the networkPolicy’s namespace # and that match other criteria, the ones that have the good label, can reach the plutono. # But sometimes, we want the plutono to be accessible to clients from other namespaces, in this case, we can use this # LabelSelector to select these namespaces, note that the networkPolicy’s namespace should also be explicitly added. # # Example: # explicitNamespacesSelector: # matchLabels: # role: frontend # matchExpressions: # - {key: role, operator: In, values: [frontend]} # |
| plutono.networkPolicy.ingress | bool | true | @param networkPolicy.allowExternal Don’t require client label for connections # The Policy model to apply. When set to false, only pods with the correct # client label will have network access to plutono port defined. # When true, plutono will accept connections from any source # (with the correct destination port). # |
| plutono.nodeSelector | object | {} | Node labels for pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ |
| plutono.persistence | object | {"accessModes":["ReadWriteOnce"],"disableWarning":false,"enabled":false,"extraPvcLabels":{},"finalizers":["kubernetes.io/pvc-protection"],"inMemory":{"enabled":false},"lookupVolumeName":true,"size":"10Gi","type":"pvc"} | Enable persistence using Persistent Volume Claims ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ |
| plutono.persistence.extraPvcLabels | object | {} | Extra labels to apply to a PVC. |
| plutono.persistence.inMemory | object | {"enabled":false} | If persistence is not enabled, this allows to mount the # local storage in-memory to improve performance # |
| plutono.persistence.lookupVolumeName | bool | true | If ’lookupVolumeName’ is set to true, Helm will attempt to retrieve the current value of ‘spec.volumeName’ and incorporate it into the template. |
| plutono.plugins | list | [] | |
| plutono.podDisruptionBudget | object | {} | See kubectl explain poddisruptionbudget.spec for more # ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ |
| plutono.podPortName | string | "plutono" | |
| plutono.rbac.create | bool | true | |
| plutono.rbac.extraClusterRoleRules | list | [] | |
| plutono.rbac.extraRoleRules | list | [] | |
| plutono.rbac.namespaced | bool | false | |
| plutono.rbac.pspEnabled | bool | false | Use an existing ClusterRole/Role (depending on rbac.namespaced false/true) useExistingRole: name-of-some-role useExistingClusterRole: name-of-some-clusterRole |
| plutono.rbac.pspUseAppArmor | bool | false | |
| plutono.readinessProbe.httpGet.path | string | "/api/health" | |
| plutono.readinessProbe.httpGet.port | int | 3000 | |
| plutono.replicas | int | 1 | |
| plutono.resources | object | {} | |
| plutono.revisionHistoryLimit | int | 10 | |
| plutono.securityContext.fsGroup | int | 472 | |
| plutono.securityContext.runAsGroup | int | 472 | |
| plutono.securityContext.runAsNonRoot | bool | true | |
| plutono.securityContext.runAsUser | int | 472 | |
| plutono.service | object | {"annotations":{"greenhouse.sap/expose":"true"},"appProtocol":"","enabled":true,"ipFamilies":[],"ipFamilyPolicy":"","labels":{"greenhouse.sap/expose":"true"},"loadBalancerClass":"","loadBalancerIP":"","loadBalancerSourceRanges":[],"port":80,"portName":"service","targetPort":3000,"type":"ClusterIP"} | Expose the plutono service to be accessed from outside the cluster (LoadBalancer service). # or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it. # ref: http://kubernetes.io/docs/user-guide/services/ # |
| plutono.service.annotations | object | {"greenhouse.sap/expose":"true"} | Service annotations. Can be templated. |
| plutono.service.appProtocol | string | "" | Adds the appProtocol field to the service. This allows to work with istio protocol selection. Ex: “http” or “tcp” |
| plutono.service.ipFamilies | list | [] | Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6. |
| plutono.service.ipFamilyPolicy | string | "" | Set the ip family policy to configure dual-stack see Configure dual-stack |
| plutono.serviceAccount.automountServiceAccountToken | bool | false | |
| plutono.serviceAccount.create | bool | true | |
| plutono.serviceAccount.labels | object | {} | |
| plutono.serviceAccount.name | string | nil | |
| plutono.serviceAccount.nameTest | string | nil | |
| plutono.serviceMonitor.enabled | bool | false | If true, a ServiceMonitor CR is created for a prometheus operator # https://github.com/coreos/prometheus-operator # |
| plutono.serviceMonitor.interval | string | "30s" | |
| plutono.serviceMonitor.labels | object | {} | namespace: monitoring (defaults to use the namespace this chart is deployed to) |
| plutono.serviceMonitor.metricRelabelings | list | [] | |
| plutono.serviceMonitor.path | string | "/metrics" | |
| plutono.serviceMonitor.relabelings | list | [] | |
| plutono.serviceMonitor.scheme | string | "http" | |
| plutono.serviceMonitor.scrapeTimeout | string | "30s" | |
| plutono.serviceMonitor.targetLabels | list | [] | |
| plutono.serviceMonitor.tlsConfig | object | {} | |
| plutono.sidecar | object | {} | Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders Requires at least Plutono 5 to work and can’t be used together with parameters dashboardProviders, datasources and dashboards |
| plutono.sidecar.alerts.env | object | {} | Additional environment variables for the alerts sidecar |
| plutono.sidecar.alerts.label | string | "plutono_alert" | label that the configmaps with alert are marked with |
| plutono.sidecar.alerts.labelValue | string | "" | value of label that the configmaps with alert are set to |
| plutono.sidecar.alerts.resource | string | "both" | search in configmap, secret or both |
| plutono.sidecar.alerts.searchNamespace | string | nil | If specified, the sidecar will search for alert config-maps inside this namespace. Otherwise the namespace in which the sidecar is running will be used. It’s also possible to specify ALL to search in all namespaces |
| plutono.sidecar.alerts.watchMethod | string | "WATCH" | Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. |
| plutono.sidecar.dashboards.defaultFolderName | string | nil | The default folder name, it will create a subfolder under the folder and put dashboards in there instead |
| plutono.sidecar.dashboards.extraMounts | list | [] | Additional dashboard sidecar volume mounts |
| plutono.sidecar.dashboards.folder | string | "/tmp/dashboards" | folder in the pod that should hold the collected dashboards (unless defaultFolderName is set) |
| plutono.sidecar.dashboards.folderAnnotation | string | nil | If specified, the sidecar will look for annotation with this name to create folder and put graph here. You can use this parameter together with provider.foldersFromFilesStructureto annotate configmaps and create folder structure. |
| plutono.sidecar.dashboards.provider | object | {"allowUiUpdates":false,"disableDelete":false,"folder":"","folderUid":"","foldersFromFilesStructure":false,"name":"sidecarProvider","orgid":1,"type":"file"} | watchServerTimeout: request to the server, asking it to cleanly close the connection after that. defaults to 60sec; much higher values like 3600 seconds (1h) are feasible for non-Azure K8S watchServerTimeout: 3600 watchClientTimeout: is a client-side timeout, configuring your local socket. If you have a network outage dropping all packets with no RST/FIN, this is how long your client waits before realizing & dropping the connection. defaults to 66sec (sic!) watchClientTimeout: 60 provider configuration that lets plutono manage the dashboards |
| plutono.sidecar.dashboards.provider.allowUiUpdates | bool | false | allow updating provisioned dashboards from the UI |
| plutono.sidecar.dashboards.provider.disableDelete | bool | false | disableDelete to activate a import-only behaviour |
| plutono.sidecar.dashboards.provider.folder | string | "" | folder in which the dashboards should be imported in plutono |
| plutono.sidecar.dashboards.provider.folderUid | string | "" | folder UID. will be automatically generated if not specified |
| plutono.sidecar.dashboards.provider.foldersFromFilesStructure | bool | false | allow Plutono to replicate dashboard structure from filesystem |
| plutono.sidecar.dashboards.provider.name | string | "sidecarProvider" | name of the provider, should be unique |
| plutono.sidecar.dashboards.provider.orgid | int | 1 | orgid as configured in plutono |
| plutono.sidecar.dashboards.provider.type | string | "file" | type of the provider |
| plutono.sidecar.dashboards.reloadURL | string | "http://localhost:3000/api/admin/provisioning/dashboards/reload" | Endpoint to send request to reload alerts |
| plutono.sidecar.dashboards.searchNamespace | string | "ALL" | Namespaces list. If specified, the sidecar will search for config-maps/secrets inside these namespaces. Otherwise the namespace in which the sidecar is running will be used. It’s also possible to specify ALL to search in all namespaces. |
| plutono.sidecar.dashboards.sizeLimit | object | {} | Sets the size limit of the dashboard sidecar emptyDir volume |
| plutono.sidecar.datasources.env | object | {} | Additional environment variables for the datasourcessidecar |
| plutono.sidecar.datasources.initDatasources | bool | false | This is needed if skipReload is true, to load any datasources defined at startup time. Deploy the datasources sidecar as an initContainer. |
| plutono.sidecar.datasources.reloadURL | string | "http://localhost:3000/api/admin/provisioning/datasources/reload" | Endpoint to send request to reload datasources |
| plutono.sidecar.datasources.resource | string | "both" | search in configmap, secret or both |
| plutono.sidecar.datasources.script | string | nil | Absolute path to shell script to execute after a datasource got reloaded |
| plutono.sidecar.datasources.searchNamespace | string | "ALL" | If specified, the sidecar will search for datasource config-maps inside this namespace. Otherwise the namespace in which the sidecar is running will be used. It’s also possible to specify ALL to search in all namespaces |
| plutono.sidecar.datasources.watchMethod | string | "WATCH" | Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. |
| plutono.sidecar.image.registry | string | "quay.io" | The Docker registry |
| plutono.testFramework.enabled | bool | true | |
| plutono.testFramework.image.registry | string | "ghcr.io" | |
| plutono.testFramework.image.repository | string | "cloudoperators/greenhouse-extensions-integration-test" | |
| plutono.testFramework.image.tag | string | "main" | |
| plutono.testFramework.imagePullPolicy | string | "IfNotPresent" | |
| plutono.testFramework.resources | object | {} | |
| plutono.testFramework.securityContext | object | {} | |
| plutono.tolerations | list | [] | Tolerations for pod assignment ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ |
| plutono.topologySpreadConstraints | list | [] | Topology Spread Constraints ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ |
| plutono.useStatefulSet | bool | false |
Example of extraVolumeMounts and extraVolumes
Configure additional volumes with extraVolumes and volume mounts with extraVolumeMounts.
Example for extraVolumeMounts and corresponding extraVolumes:
extraVolumeMounts:
- name: plugins
mountPath: /var/lib/plutono/plugins
subPath: configs/plutono/plugins
readOnly: false
- name: dashboards
mountPath: /var/lib/plutono/dashboards
hostPath: /usr/shared/plutono/dashboards
readOnly: false
extraVolumes:
- name: plugins
existingClaim: existing-plutono-claim
- name: dashboards
hostPath: /usr/shared/plutono/dashboards
Volumes default to emptyDir. Set to persistentVolumeClaim,
hostPath, csi, or configMap for other types. For a
persistentVolumeClaim, specify an existing claim name with
existingClaim.
Import dashboards
There are a few methods to import dashboards to Plutono. Below are some examples and explanations as to how to use each method:
dashboards:
default:
some-dashboard:
json: |
{
"annotations":
...
# Complete json file here
...
"title": "Some Dashboard",
"uid": "abcd1234",
"version": 1
}
custom-dashboard:
# This is a path to a file inside the dashboards directory inside the chart directory
file: dashboards/custom-dashboard.json
prometheus-stats:
# Ref: https://plutono.com/dashboards/2
gnetId: 2
revision: 2
datasource: Prometheus
loki-dashboard-quick-search:
gnetId: 12019
revision: 2
datasource:
- name: DS_PROMETHEUS
value: Prometheus
local-dashboard:
url: https://raw.githubusercontent.com/user/repository/master/dashboards/dashboard.json
Create a dashboard
Click Dashboards in the main menu.
Click New and select New Dashboard.
Click Add new empty panel.
Important: Add a datasource variable as they are provisioned in the cluster.
- Go to Dashboard settings.
- Click Variables.
- Click Add variable.
- General: Configure the variable with a proper Name as Type
Datasource. - Data source options: Select the data source Type e.g.
Prometheus. - Click Update.
- Go back.
Develop your panels.
- On the Edit panel view, choose your desired Visualization.
- Select the datasource variable you just created.
- Write or construct a query in the query language of your data source.
- Move and resize the panels as needed.
Optionally add a tag to the dashboard to make grouping easier.
- Go to Dashboard settings.
- In the General section, add a Tag.
Click Save. Note that the dashboard is saved in the browser’s local storage.
Export the dashboard.
- Go to Dashboard settings.
- Click JSON Model.
- Copy the JSON model.
- Go to your Github repository and create a new JSON file in the
dashboardsdirectory.
BASE64 dashboards
Dashboards could be stored on a server that does not return JSON directly and instead of it returns a Base64 encoded file (e.g. Gerrit) A new parameter has been added to the url use case so if you specify a b64content value equals to true after the url entry a Base64 decoding is applied before save the file to disk. If this entry is not set or is equals to false not decoding is applied to the file before saving it to disk.
Gerrit use case
Gerrit API for download files has the following schema: https://yourgerritserver/a/{project-name}/branches/{branch-id}/files/{file-id}/content where {project-name} and {file-id} usually has ‘/’ in their values and so they MUST be replaced by %2F so if project-name is user/repo, branch-id is master and file-id is equals to dir1/dir2/dashboard the url value is https://yourgerritserver/a/user%2Frepo/branches/master/files/dir1%2Fdir2%2Fdashboard/content
Sidecar for dashboards
If the parameter sidecar.dashboards.enabled is set, a sidecar container is deployed in the plutono
pod. This container watches all configmaps (or secrets) in the cluster and filters out the ones with
a label as defined in sidecar.dashboards.label. The files defined in those configmaps are written
to a folder and accessed by plutono. Changes to the configmaps are monitored and the imported
dashboards are deleted/updated.
A recommendation is to use one configmap per dashboard, as a reduction of multiple dashboards inside one configmap is currently not properly mirrored in plutono.
NOTE: Configure your data sources in your dashboards as variables to keep them portable across clusters.
Example dashboard config:
Folder structure:
dashboards/
├── dashboard1.json
├── dashboard2.json
templates/
├──dashboard-json-configmap.yaml
Helm template to create a configmap for each dashboard:
{{- range $path, $bytes := .Files.Glob "dashboards/*.json" }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-%s" $.Release.Name $path | replace "/" "-" | trunc 63 }}
labels:
plutono-dashboard: "true"
data:
{{ printf "%s: |-" $path | replace "/" "-" | indent 2 }}
{{ printf "%s" $bytes | indent 4 }}
{{- end }}
Sidecar for datasources
If the parameter sidecar.datasources.enabled is set, an init container is deployed in the plutono
pod. This container lists all secrets (or configmaps, though not recommended) in the cluster and
filters out the ones with a label as defined in sidecar.datasources.label. The files defined in
those secrets are written to a folder and accessed by plutono on startup. Using these yaml files,
the data sources in plutono can be imported.
Should you aim for reloading datasources in Plutono each time the config is changed, set sidecar.datasources.skipReload: false and adjust sidecar.datasources.reloadURL to http://<svc-name>.<namespace>.svc.cluster.local/api/admin/provisioning/datasources/reload.
Secrets are recommended over configmaps for this usecase because datasources usually contain private data like usernames and passwords. Secrets are the more appropriate cluster resource to manage those.
Example datasource config:
apiVersion: v1
kind: Secret
metadata:
name: plutono-datasources
labels:
# default value for: sidecar.datasources.label
plutono-datasource: "true"
stringData:
datasources.yaml: |-
apiVersion: 1
datasources:
- name: my-prometheus
type: prometheus
access: proxy
orgId: 1
url: my-url-domain:9090
isDefault: false
jsonData:
httpMethod: 'POST'
editable: false
NOTE: If you might include credentials in your datasource configuration, make sure to not use stringdata but base64 encoded data instead.
apiVersion: v1
kind: Secret
metadata:
name: my-datasource
labels:
plutono-datasource: "true"
data:
# The key must contain a unique name and the .yaml file type
my-datasource.yaml: {{ include (print $.Template.BasePath "my-datasource.yaml") . | b64enc }}
Example values to add a datasource adapted from Grafana:
datasources:
datasources.yaml:
apiVersion: 1
datasources:
# <string, required> Sets the name you use to refer to
# the data source in panels and queries.
- name: my-prometheus
# <string, required> Sets the data source type.
type: prometheus
# <string, required> Sets the access mode, either
# proxy or direct (Server or Browser in the UI).
# Some data sources are incompatible with any setting
# but proxy (Server).
access: proxy
# <int> Sets the organization id. Defaults to orgId 1.
orgId: 1
# <string> Sets a custom UID to reference this
# data source in other parts of the configuration.
# If not specified, Plutono generates one.
uid:
# <string> Sets the data source's URL, including the
# port.
url: my-url-domain:9090
# <string> Sets the database user, if necessary.
user:
# <string> Sets the database name, if necessary.
database:
# <bool> Enables basic authorization.
basicAuth:
# <string> Sets the basic authorization username.
basicAuthUser:
# <bool> Enables credential headers.
withCredentials:
# <bool> Toggles whether the data source is pre-selected
# for new panels. You can set only one default
# data source per organization.
isDefault: false
# <map> Fields to convert to JSON and store in jsonData.
jsonData:
httpMethod: 'POST'
# <bool> Enables TLS authentication using a client
# certificate configured in secureJsonData.
# tlsAuth: true
# <bool> Enables TLS authentication using a CA
# certificate.
# tlsAuthWithCACert: true
# <map> Fields to encrypt before storing in jsonData.
secureJsonData:
# <string> Defines the CA cert, client cert, and
# client key for encrypted authentication.
# tlsCACert: '...'
# tlsClientCert: '...'
# tlsClientKey: '...'
# <string> Sets the database password, if necessary.
# password:
# <string> Sets the basic authorization password.
# basicAuthPassword:
# <int> Sets the version. Used to compare versions when
# updating. Ignored when creating a new data source.
version: 1
# <bool> Allows users to edit data sources from the
# Plutono UI.
editable: false
How to serve Plutono with a path prefix (/plutono)
In order to serve Plutono with a prefix (e.g., http://example.com/plutono), add the following to your values.yaml.
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /$1
nginx.ingress.kubernetes.io/use-regex: "true"
path: /plutono/?(.*)
hosts:
- k8s.example.dev
plutono.ini:
server:
root_url: http://localhost:3000/plutono # this host can be localhost
How to securely reference secrets in plutono.ini
This example uses Plutono file providers for secret values and the extraSecretMounts configuration flag (Additional plutono server secret mounts) to mount the secrets.
In plutono.ini:
plutono.ini:
[auth.generic_oauth]
enabled = true
client_id = $__file{/etc/secrets/auth_generic_oauth/client_id}
client_secret = $__file{/etc/secrets/auth_generic_oauth/client_secret}
Existing secret, or created along with helm:
---
apiVersion: v1
kind: Secret
metadata:
name: auth-generic-oauth-secret
type: Opaque
stringData:
client_id: <value>
client_secret: <value>
- Include in the
extraSecretMountsconfiguration flag:
- extraSecretMounts:
- name: auth-generic-oauth-secret-mount
secretName: auth-generic-oauth-secret
defaultMode: 0440
mountPath: /etc/secrets/auth_generic_oauth
readOnly: true
4.3.16 - Prometheus
Learn more about the prometheus plugin. Use it to deploy a single Prometheus for your Greenhouse cluster.
The main terminologies used in this document can be found in core-concepts.
Overview
Observability is often required for operation and automation of service offerings. To get the insights provided by an application and the container runtime environment, you need telemetry data in the form of metrics or logs sent to backends such as Prometheus or OpenSearch. With the prometheus Plugin, you will be able to cover the metrics part of the observability stack.
This Plugin includes a pre-configured package of Prometheus that help make getting started easy and efficient. At its core, an automated and managed Prometheus installation is provided using the prometheus-operator.
Components included in this Plugin:
- Prometheus
- optional: Prometheus Operator
Disclaimer
It is not meant to be a comprehensive package that covers all scenarios. If you are an expert, feel free to configure the plugin according to your needs.
The Plugin is a configured kube-prometheus-stack Helm chart which helps to keep track of versions and community updates. The intention is, to deliver a pre-configured package that work out of the box and can be extended by following the guide.
Also worth to mention, we reuse the existing kube-monitoring Greenhouse plugin helm chart, which already preconfigures Prometheus just by disabling the Kubernetes component scrapers and exporters.
Contribution is highly appreciated. If you discover bugs or want to add functionality to the plugin, then pull requests are always welcome.
Quick start
This guide provides a quick and straightforward way to deploy prometheus as a Greenhouse Plugin on your Kubernetes cluster.
Prerequisites
A running and Greenhouse-onboarded Kubernetes cluster. If you don’t have one, follow the Cluster onboarding guide.
Installed prometheus-operator and it’s custom resource definitions (CRDs). As a foundation we recommend installing the
kube-monitoringplugin first in your cluster to provide the prometheus-operator and it’s CRDs. There are two paths to do it:- Go to Greenhouse dashboard and select the Prometheus plugin from the catalog. Specify the cluster and required option values.
- Create and specify a
Pluginresource in your Greenhouse central cluster according to the examples.
Step 1:
If you want to run the prometheus plugin without installing kube-monitoring in the first place, then you need to switch kubeMonitoring.prometheusOperator.enabled and kubeMonitoring.crds.enabled to true.
Step 2:
After installation, Greenhouse will provide a generated link to the Prometheus user interface. This is done via the annotation greenhouse.sap/expose: “true” at the Prometheus Service resource.
Step 3:
Greenhouse regularly performs integration tests that are bundled with prometheus. These provide feedback on whether all the necessary resources are installed and continuously up and running. You will find messages about this in the plugin status and also in the Greenhouse dashboard.
Configuration
Global options
| Name | Description | Value |
|---|---|---|
global.commonLabels | Labels to add to all resources. This can be used to add a support_group or service label to all resources and alerting rules. | true |
Prometheus-operator options
| Name | Description | Value |
|---|---|---|
kubeMonitoring.prometheusOperator.enabled | Manages Prometheus and Alertmanager components | true |
kubeMonitoring.prometheusOperator.alertmanagerInstanceNamespaces | Filter namespaces to look for prometheus-operator Alertmanager resources | [] |
kubeMonitoring.prometheusOperator.alertmanagerConfigNamespaces | Filter namespaces to look for prometheus-operator AlertmanagerConfig resources | [] |
kubeMonitoring.prometheusOperator.prometheusInstanceNamespaces | Filter namespaces to look for prometheus-operator Prometheus resources | [] |
Prometheus options
| Name | Description | Value |
|---|---|---|
kubeMonitoring.prometheus.enabled | Deploy a Prometheus instance | true |
kubeMonitoring.prometheus.annotations | Annotations for Prometheus | {} |
kubeMonitoring.prometheus.tlsConfig.caCert | CA certificate to verify technical clients at Prometheus Ingress | Secret |
kubeMonitoring.prometheus.ingress.enabled | Deploy Prometheus Ingress | true |
kubeMonitoring.prometheus.ingress.hosts | Must be provided if Ingress is enabled. | [] |
kubeMonitoring.prometheus.ingress.ingressClassname | Specifies the ingress-controller | nginx |
kubeMonitoring.prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.resources.requests.storage | How large the persistent volume should be to house the prometheus database. Default 50Gi. | "" |
kubeMonitoring.prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.storageClassName | The storage class to use for the persistent volume. | "" |
kubeMonitoring.prometheus.prometheusSpec.scrapeInterval | Interval between consecutive scrapes. Defaults to 30s | "" |
kubeMonitoring.prometheus.prometheusSpec.scrapeTimeout | Number of seconds to wait for target to respond before erroring | "" |
kubeMonitoring.prometheus.prometheusSpec.evaluationInterval | Interval between consecutive evaluations | "" |
kubeMonitoring.prometheus.prometheusSpec.externalLabels | External labels to add to any time series or alerts when communicating with external systems like Alertmanager | {} |
kubeMonitoring.prometheus.prometheusSpec.ruleSelector | PrometheusRules to be selected for target discovery. Defaults to { matchLabels: { plugin: <metadata.name> } } | {} |
kubeMonitoring.prometheus.prometheusSpec.serviceMonitorSelector | ServiceMonitors to be selected for target discovery. Defaults to { matchLabels: { plugin: <metadata.name> } } | {} |
kubeMonitoring.prometheus.prometheusSpec.podMonitorSelector | PodMonitors to be selected for target discovery. Defaults to { matchLabels: { plugin: <metadata.name> } } | {} |
kubeMonitoring.prometheus.prometheusSpec.probeSelector | Probes to be selected for target discovery. Defaults to { matchLabels: { plugin: <metadata.name> } } | {} |
kubeMonitoring.prometheus.prometheusSpec.scrapeConfigSelector | scrapeConfigs to be selected for target discovery. Defaults to { matchLabels: { plugin: <metadata.name> } } | {} |
kubeMonitoring.prometheus.prometheusSpec.retention | How long to retain metrics | "" |
kubeMonitoring.prometheus.prometheusSpec.logLevel | Log level to be configured for Prometheus | "" |
kubeMonitoring.prometheus.prometheusSpec.additionalScrapeConfigs | Next to ScrapeConfig CRD, you can use AdditionalScrapeConfigs, which allows specifying additional Prometheus scrape configurations | "" |
kubeMonitoring.prometheus.prometheusSpec.additionalArgs | Allows setting additional arguments for the Prometheus container | [] |
Alertmanager options
| Name | Description | Value |
|---|---|---|
alerts.enabled | To send alerts to Alertmanager | false |
alerts.alertmanager.hosts | List of Alertmanager hosts Prometheus can send alerts to | [] |
alerts.alertmanager.tlsConfig.cert | TLS certificate for communication with Alertmanager | Secret |
alerts.alertmanager.tlsConfig.key | TLS key for communication with Alertmanager | Secret |
Service Discovery
The prometheus Plugin provides a PodMonitor to automatically discover the Prometheus metrics of the Kubernetes Pods in any Namespace. The PodMonitor is configured to detect the metrics endpoint of the Pods if the following annotations are set:
metadata:
annotations:
greenhouse/scrape: “true”
greenhouse/target: <prometheus plugin name>
Note: The annotations needs to be added manually to have the pod scraped and the port name needs to match.
Examples
Deploy kube-monitoring into a remote cluster
apiVersion: greenhouse.sap/v1alpha1
kind: Plugin
metadata:
name: prometheus
spec:
pluginDefinition: prometheus
disabled: false
optionValues:
- name: kubeMonitoring.prometheus.prometheusSpec.retention
value: 30d
- name: kubeMonitoring.prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.resources.requests.storage
value: 100Gi
- name: kubeMonitoring.prometheus.service.labels
value:
greenhouse.sap/expose: "true"
- name: kubeMonitoring.prometheus.prometheusSpec.externalLabels
value:
cluster: example-cluster
organization: example-org
region: example-region
- name: alerts.enabled
value: true
- name: alerts.alertmanagers.hosts
value:
- alertmanager.dns.example.com
- name: alerts.alertmanagers.tlsConfig.cert
valueFrom:
secret:
key: tls.crt
name: tls-prometheus-<org-name>
- name: alerts.alertmanagers.tlsConfig.key
valueFrom:
secret:
key: tls.key
name: tls-prometheus-<org-name>
Extension of the plugin
prometheus can be extended with your own alerting rules and target configurations via the Custom Resource Definitions (CRDs) of the prometheus-operator. The user-defined resources to be incorporated with the desired configuration are defined via label selections.
The CRD PrometheusRule enables the definition of alerting and recording rules that can be used by Prometheus or Thanos Rule instances. Alerts and recording rules are reconciled and dynamically loaded by the operator without having to restart Prometheus or Thanos Rule.
prometheus will automatically discover and load the rules that match labels plugin: <plugin-name>.
Example:
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: example-prometheus-rule
labels:
plugin: <metadata.name>
## e.g plugin: prometheus-network
spec:
groups:
- name: example-group
rules:
...
The CRDs PodMonitor, ServiceMonitor, Probe and ScrapeConfig allow the definition of a set of target endpoints to be scraped by prometheus. The operator will automatically discover and load the configurations that match labels plugin: <plugin-name>.
Example:
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: example-pod-monitor
labels:
plugin: <metadata.name>
## e.g plugin: prometheus-network
spec:
selector:
matchLabels:
app: example-app
namespaceSelector:
matchNames:
- example-namespace
podMetricsEndpoints:
- port: http
...
4.3.17 - Reloader
This Plugin provides the Reloader to automate triggering rollouts of workloads whenever referenced Secrets or ConfigMaps are updated.
4.3.18 - Repo Guard
Repo Guard Greenhouse Plugin manages Github teams, team memberships and repository & team assignments.
Hierarchy of Custom Resources

Custom Resources
Github – an installation of Github App
apiVersion: githubguard.sap/v1
kind: Github
metadata:
name: com
spec:
webURL: https://github.com
v3APIURL: https://api.github.com
integrationID: 123456
clientUserAgent: greenhouse-repo-guard
secret: github-com-secret
GithubOrganization with Feature & Action Flags
apiVersion: githubguard.sap/v1
kind: GithubOrganization
metadata:
name: com--greenhouse-sandbox
labels:
githubguard.sap/addTeam: "true"
githubguard.sap/removeTeam: "true"
githubguard.sap/addOrganizationOwner: "true"
githubguard.sap/removeOrganizationOwner: "true"
githubguard.sap/addRepositoryTeam: "true"
githubguard.sap/removeRepositoryTeam: "true"
githubguard.sap/dryRun: "false"
Default team & repository assignments:

GithubTeamRepository for exception team & repository assignments

GithubAccountLink for external account matching
apiVersion: githubguard.sap/v1
kind: GithubAccountLink
metadata:
annotations:
name: com-123456
spec:
userID: 123456
githubID: 2042059
github: com
4.3.19 - Service exposure test
This Plugin is just providing a simple exposed service for manual testing.
By adding the following label or annotation to a service it will become accessible from the central greenhouse system via a service proxy:
Label (legacy, transitioning to annotation):
greenhouse.sap/expose: "true"
Annotation:
greenhouse.sap/expose: "true"
During the transition period, both label and annotation are supported.
This plugin create an nginx deployment with an exposed service for testing.
Configuration
Specific port
By default expose would always use the first port. If you need another port, you’ve got to specify it by name:
Label (legacy, transitioning to annotation):
greenhouse.sap/exposeNamedPort: YOURPORTNAME
Annotation:
greenhouse.sap/exposed-named-port: YOURPORTNAME
During the transition period, both label and annotation are supported.
4.3.20 - Thanos
Learn more about the Thanos Plugin. Use it to enable extended metrics retention and querying across Prometheus servers and Greenhouse clusters.
The main terminologies used in this document can be found in core-concepts.
Overview
Thanos is a set of components that can be used to extend the storage and retrieval of metrics in Prometheus. It allows you to store metrics in a remote object store and query them across multiple Prometheus servers and Greenhouse clusters. This Plugin is intended to provide a set of pre-configured Thanos components that enable a proven composition. At the core, a set of Thanos components is installed that adds long-term storage capability to a single kube-monitoring Plugin and makes both current and historical data available again via one Thanos Query component.

The Thanos Sidecar is a component that is deployed as a container together with a Prometheus instance. This allows Thanos to optionally upload metrics to the object store and Thanos Query to access Prometheus data via a common, efficient StoreAPI.
The Thanos Compact component applies the Prometheus 2.0 Storage Engine compaction process to data uploaded to the object store. The Compactor is also responsible for applying the configured retention and downsampling of the data.
The Thanos Store also implements the StoreAPI and serves the historical data from an object store. It acts primarily as an API gateway and has no persistence itself.
Thanos Query implements the Prometheus HTTP v1 API for querying data in a Thanos cluster via PromQL. In short, it collects the data needed to evaluate the query from the connected StoreAPIs, evaluates the query and returns the result.
This plugin deploys the following Thanos components:
Planned components:
This Plugin does not deploy the following components:
- Thanos Sidecar This component is installed in the kube-monitoring plugin.
Disclaimer
It is not meant to be a comprehensive package that covers all scenarios. If you are an expert, feel free to configure the Plugin according to your needs.
Contribution is highly appreciated. If you discover bugs or want to add functionality to the plugin, then pull requests are always welcome.
Quick start
This guide provides a quick and straightforward way to use Thanos as a Greenhouse Plugin on your Kubernetes cluster. The guide is meant to build the following setup.
Prerequisites
- A running and Greenhouse-onboarded Kubernetes cluster. If you don’t have one, follow the Cluster onboarding guide.
- Ready to use credentials for a compatible object store
- kube-monitoring plugin installed. Thanos Sidecar on the Prometheus must be enabled by providing the required object store credentials.
Step 1:
Create a Kubernetes Secret with your object store credentials following the Object Store preparation section.
Step 2:
Enable the Thanos Sidecar on the Prometheus in the kube-monitoring plugin by providing the required object store credentials. Follow the kube-monitoring plugin enablement section.
Step 3:
Create a Thanos Query Plugin by following the Thanos Query section.
Configuration
Object Store preparation
To run Thanos, you need object storage credentials. Get the credentials of your provider and add them to a Kubernetes Secret. The Thanos documentation provides a great overview on the different supported store types.
Usually this looks somewhat like this
type: $STORAGE_TYPE
config:
user:
password:
domain:
...
Refer to the kube-monitoring README for detailed instructions on:
- How to use an existing Kubernetes Secret for object storage configuration
- How to provide plain text config that will automatically create a Kubernetes Secret
When configuring object storage for the Thanos charts, you must specify both the name of the existing Secret and the key (file name) within that Secret containing your object store configuration. This is done using the existingObjectStoreSecret values:
spec:
optionValues:
- name: thanos.existingObjectStoreSecret
value:
configFile: <your-config-file-name>
name: <your-secret-name>
name: The name of the Kubernetes Secret containing your object storage configuration. (default,kube-monitoring-prometheus)configFile: The key (file name) in the Secret where the object store config is stored (default,object-storage-configs.yaml)
Thanos Query
This is the real deal now: Define your Thanos Query by creating a plugin.
NOTE1: $THANOS_PLUGIN_NAME needs to be consistent with your secret created earlier.
NOTE2: The releaseNamespace needs to be the same as to where kube-monitoring resides. By default this is kube-monitoring.
apiVersion: greenhouse.sap/v1alpha1
kind: Plugin
metadata:
name: $YOUR_CLUSTER_NAME
spec:
pluginDefinition: thanos
disabled: false
clusterName: $YOUR_CLUSTER_NAME
releaseNamespace: kube-monitoring
Thanos Ruler
Thanos Ruler evaluates Prometheus rules against choosen query API. This allows evaluation of rules using metrics from different Prometheus instances.

To enable Thanos Ruler component creation (Thanos Ruler is disabled by default) you have to set:
spec:
optionsValues:
- name: thanos.ruler.enabled
value: true
Configuration
Alertmanager
For Thanos Ruler to communicate with Alertmanager we need to enable the appropriate configuration and provide secret/key names containing necessary SSO key and certificate to the Plugin.
Example of Plugin setup with Thanos Ruler using Alertmanager
spec:
optionsValues:
- name: thanos.ruler.enabled
value: true
- name: thanos.ruler.alertmanagers.enabled
value: true
- name: thanos.ruler.alertmanagers.authentication.ssoCert
valueFrom:
secret:
key: $KEY_NAME
name: $SECRET_NAME
- name: thanos.ruler.alertmanagers.authentication.ssoKey
valueFrom:
secret:
key: $KEY_NAME
name: $SECRET_NAME
[OPTIONAL] Handling your Prometheus and Thanos Stores.
Default Prometheus and Thanos Endpoint
Thanos Query is automatically adding the Prometheus and Thanos endpoints. If you just have a single Prometheus with Thanos enabled this will work out of the box. Details in the next two chapters. See Standalone Query for your own configuration.
Prometheus Endpoint
Thanos Query would check for a service prometheus-operated in the same namespace with this GRPC port to be available 10901. The cli option looks like this and is configured in the Plugin itself:
--store=prometheus-operated:10901
Thanos Endpoint
Thanos Query would check for a Thanos endpoint named like releaseName-store. The associated command line flag for this parameter would look like:
--store=thanos-kube-store:10901
If you just have one occurence of this Thanos plugin deployed, the default option would work and does not need anything else.
Standalone Query

In case you want to achieve a setup like above and have an overarching Thanos Query to run with multiple Stores, you can disable all other thanos components and add your own store list. Setup your Plugin like this:
spec:
optionsValues:
- name: thanos.store.enabled
value: false
- name: thanos.compactor.enabled
value: false
This would enable you to either:
query multiple stores with a single Query
spec: optionsValues: - name: thanos.query.stores value: - thanos-kube-1-store:10901 - thanos-kube-2-store:10901 - kube-monitoring-1-prometheus:10901 - kube-monitoring-2-prometheus:10901query multiple Thanos Queries with a single Query Note that there is no
-storesuffix here in this case.spec: optionsValues: - name: thanos.query.stores value: - thanos-kube-1:10901 - thanos-kube-2:10901
Query GRPC Ingress
To expose the Thanos Query GRPC endpoint externally, you can configure an ingress resource. This is useful for enabling external tools or other clusters to query the Thanos Query component. Example configuration for enabling GRPC ingress:
grpc:
enabled: true
hosts:
- host: thanos.local
paths:
- path: /
pathType: ImplementationSpecific
TLS Ingress
To enable TLS for the Thanos Query GRPC endpoint, you can configure a TLS secret. This is useful for securing the communication between external clients and the Thanos Query component. Example configuration for enabling TLS ingress:
tls: []
- secretName: ingress-cert
hosts: [thanos.local]
Thanos Global Query
In the case of a multi-cluster setup, you may want your Thanos Query to be able to query all Thanos components in all clusters. This is possible by leveraging GRPC Ingress and TLS Ingress.
If your remote clusters are reachable via a common domain, you can add the endpoints of the remote clusters to the stores list in the Thanos Query configuration. This allows the Thanos Query to query all Thanos components across all clusters.
spec:
optionsValues:
- name: thanos.query.stores
value:
- thanos.local-1:443
- thanos.local-2:443
- thanos.local-3:443
Pay attention to port numbers. The default port for GRPC is 443.
Disable Individual Thanos Components
It is possible to disable certain Thanos components for your deployment. To do so add the necessary configuration to your Plugin (currently it is not possible to disable the query component)
- name: thanos.store.enabled
value: false
- name: thanos.compactor.enabled
value: false
| Thanos Component | Enabled by default | Deactivatable | Flag |
|---|---|---|---|
| Query | True | True | thanos.query.enabled |
| Store | True | True | thanos.store.enabled |
| Compactor | True | True | thanos.compactor.enabled |
| Ruler | False | True | thanos.ruler.enabled |
Operations
Thanos Compactor
If you deploy the plugin with the default values, Thanos compactor will be shipped too and use the same secret ($THANOS_PLUGIN_NAME-metrics-objectstore) to retrieve, compact and push back timeseries.
Based on experience, a 100Gi-PVC is used in order not to overload the ephermeral storage of the Kubernetes Nodes. Depending on the configured retention and the amount of metrics, this may not be sufficient and larger volumes may be required. In any case, it is always safe to clear the volume of the compactor and increase it if necessary.
The object storage costs will be heavily impacted on how granular timeseries are being stored (reference Downsampling). These are the pre-configured defaults, you can change them as needed:
raw: 777600s (90d)
5m: 777600s (90d)
1h: 157680000 (5y)
Thanos ServiceMonitor
ServiceMonitor configures Prometheus to scrape metrics from all the deployed Thanos components.
To enable the creation of a ServiceMonitor we can use the Thanos Plugin configuration.
NOTE: You have to provide the serviceMonitorSelector matchLabels of your Prometheus instance. In the greenhouse context this should look like ‘plugin: $PROMETHEUS_PLUGIN_NAME’
spec:
optionsValues:
- name: thanos.serviceMonitor.selfMonitor
value: true
- name: thanos.serviceMonitor.labels
value:
plugin: $PROMETHEUS_PLUGIN_NAME
Creating Datasources for Perses
When deploying Thanos, a Perses datasource is automatically created by default, allowing Perses to fetch data for its visualizations and making it the global default datasource for the selected Perses instance.
The Perses datasource is created as a configmap, which allows Perses to connect to the Thanos Query API and retrieve metrics. This integration is essential for enabling dashboards and visualizations in Perses.
Example configuration:
spec:
optionsValues:
- name: thanos.query.persesDatasource.create
value: true
- name: thanos.query.persesDatasource.selector
value: perses.dev/resource: "true"
You can further customize the datasource resource using the selector field if you want to target specific Perses instances.
Note:
- The Perses datasource is always created as the global default for Perses.
- The datasource configmap is required for Perses to fetch data for its visualizations.
For more details, see the thanos.query.persesDatasource options in the Values table below.
Blackbox-exporter Integration
If Blackbox-exporter is enabled and store endpoints are provided, this Thanos deployment will automatically create a ServiceMonitor to probe the specified Thanos GRPC endpoints. Additionally, a PrometheusRule is created to alert in case of failing probes. This allows you to monitor the availability and responsiveness of your Thanos Store components using Blackbox probes and receive alerts if any endpoints become unreachable.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| blackboxExporter.enabled | bool | false | Enable creation of Blackbox exporter resources for probing Thanos stores. It will create ServiceMonitor and PrometheusRule CR to probe store endpoints provided to the helm release (thanos.query.stores) Make sure Blackbox exporter is enabled in kube-monitoring plugin and that it uses same TLS secret as the Thanos instance. |
| global.commonLabels | object | the chart will add some internal labels automatically | Labels to apply to all resources |
| global.imageRegistry | string | nil | Overrides the registry globally for all images |
| thanos.compactor.additionalArgs | list | [] | Adding additional arguments to Thanos Compactor |
| thanos.compactor.annotations | object | {} | Annotations to add to the Thanos Compactor resources |
| thanos.compactor.compact.cleanupInterval | string | 1800s | Set Thanos Compactor compact.cleanup-interval |
| thanos.compactor.compact.concurrency | string | 1 | Set Thanos Compactor compact.concurrency |
| thanos.compactor.compact.waitInterval | string | 900s | Set Thanos Compactor wait-interval |
| thanos.compactor.consistencyDelay | string | 1800s | Set Thanos Compactor consistency-delay |
| thanos.compactor.containerLabels | object | {} | Labels to add to the Thanos Compactor container |
| thanos.compactor.deploymentLabels | object | {} | Labels to add to the Thanos Compactor deployment |
| thanos.compactor.enabled | bool | true | Enable Thanos Compactor component |
| thanos.compactor.httpGracePeriod | string | 120s | Set Thanos Compactor http-grace-period |
| thanos.compactor.logLevel | string | info | Thanos Compactor log level |
| thanos.compactor.resources | object | ressources: requests: memory: cpu: limits: memory: cpu: | Resource requests and limits for the Thanos Compactor container. |
| thanos.compactor.retentionResolution1h | string | 157680000s | Set Thanos Compactor retention.resolution-1h |
| thanos.compactor.retentionResolution5m | string | 7776000s | Set Thanos Compactor retention.resolution-5m |
| thanos.compactor.retentionResolutionRaw | string | 7776000s | Set Thanos Compactor retention.resolution-raw |
| thanos.compactor.serviceAnnotations | object | {} | Service specific annotations to add to the Thanos Compactor service in addition to its already configured annotations. |
| thanos.compactor.serviceLabels | object | {} | Labels to add to the Thanos Compactor service |
| thanos.compactor.volume.labels | list | [] | Labels to add to the Thanos Compactor PVC resource |
| thanos.compactor.volume.size | string | 100Gi | Set Thanos Compactor PersistentVolumeClaim size in Gi |
| thanos.existingObjectStoreSecret.configFile | string | thanos.yaml | Object store config file name |
| thanos.existingObjectStoreSecret.name | string | {{ include “release.name” . }}-metrics-objectstore | Use existing objectStorageConfig Secret data and configure it to be used by Thanos Compactor and Store https://thanos.io/tip/thanos/storage.md/#s3 |
| thanos.extraObjects | list | [] | Deploy extra K8s manifests |
| thanos.grpcAddress | string | 0.0.0.0:10901 | GRPC-address used across the stack |
| thanos.httpAddress | string | 0.0.0.0:10902 | HTTP-address used across the stack |
| thanos.image.pullPolicy | string | "IfNotPresent" | Thanos image pull policy |
| thanos.image.repository | string | "quay.io/thanos/thanos" | Thanos image repository |
| thanos.image.tag | string | "v0.39.2" | Thanos image tag |
| thanos.query.additionalArgs | list | [] | Adding additional arguments to Thanos Query |
| thanos.query.annotations | object | {} | Annotations to add to the Thanos Query resources |
| thanos.query.autoDownsampling | bool | true | Set Thanos Query auto-downsampling |
| thanos.query.containerLabels | object | {} | Labels to add to the Thanos Query container |
| thanos.query.deploymentLabels | object | {} | Labels to add to the Thanos Query deployment |
| thanos.query.enabled | bool | true | Enable Thanos Query component |
| thanos.query.ingress.annotations | object | {} | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. For a full list of possible ingress annotations, please see ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md |
| thanos.query.ingress.enabled | bool | false | Enable ingress controller resource |
| thanos.query.ingress.grpc.annotations | object | {} | Additional annotations for the Ingress resource.(GRPC) To enable certificate autogeneration, place here your cert-manager annotations. For a full list of possible ingress annotations, please see ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md |
| thanos.query.ingress.grpc.enabled | bool | false | Enable ingress controller resource.(GRPC) |
| thanos.query.ingress.grpc.hosts | list | [{"host":"thanos.local","paths":[{"path":"/","pathType":"Prefix"}]}] | Default host for the ingress resource.(GRPC) |
| thanos.query.ingress.grpc.ingressClassName | string | "" | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)(GRPC) This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster . ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/ |
| thanos.query.ingress.grpc.tls | list | [] | Ingress TLS configuration. (GRPC) |
| thanos.query.ingress.hosts | list | [{"host":"thanos.local","paths":[{"path":"/","pathType":"Prefix","portName":"http"}]}] | Default host for the ingress resource |
| thanos.query.ingress.ingressClassName | string | "" | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster . ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/ |
| thanos.query.ingress.tls | list | [] | Ingress TLS configuration |
| thanos.query.logLevel | string | info | Thanos Query log level |
| thanos.query.persesDatasource.create | bool | true | Creates a Perses datasource for Thanos Query |
| thanos.query.persesDatasource.isDefault | bool | true | set datasource as default for Perses. Consider setting this to false only if you have another (default) datasource for Perses already. |
| thanos.query.persesDatasource.selector | object | {} | Label selectors for the Perses sidecar to detect this datasource. |
| thanos.query.plutonoDatasource.create | bool | false | Creates a Perses datasource for Thanos Query |
| thanos.query.plutonoDatasource.isDefault | bool | false | set datasource as default for Plutono |
| thanos.query.plutonoDatasource.selector | object | {} | Label selectors for the Plutono sidecar to detect this datasource. |
| thanos.query.replicaLabel | string | "prometheus_replica" | Set Thanos Query replica-label for Prometheus replicas |
| thanos.query.replicas | string | nil | Number of Thanos Query replicas to deploy |
| thanos.query.resources | object | ressources: requests: memory: cpu: limits: memory: cpu: | Resource requests and limits for the Thanos Query container. |
| thanos.query.serviceAnnotations | object | {} | Service specific annotations to add to the Thanos Query service in addition to its already configured annotations. |
| thanos.query.serviceLabels | object | {} | Labels to add to the Thanos Query service |
| thanos.query.stores | list | [] | Thanos Query store endpoints |
| thanos.query.tls.data | object | {} | |
| thanos.query.tls.secretName | string | "" | |
| thanos.query.web.externalPrefix | string | nil | |
| thanos.query.web.routePrefix | string | nil | |
| thanos.ruler.alertmanagers | object | nil | Configures the list of Alertmanager endpoints to send alerts to. The configuration format is defined at https://thanos.io/tip/components/rule.md/#alertmanager. |
| thanos.ruler.alertmanagers.authentication.enabled | bool | true | Enable Alertmanager authentication for Thanos Ruler |
| thanos.ruler.alertmanagers.authentication.ssoCert | string | nil | SSO Cert for Alertmanager authentication |
| thanos.ruler.alertmanagers.authentication.ssoKey | string | nil | SSO Key for Alertmanager authentication |
| thanos.ruler.alertmanagers.enabled | bool | true | Enable Thanos Ruler Alertmanager config |
| thanos.ruler.alertmanagers.hosts | string | nil | List of hosts endpoints to send alerts to |
| thanos.ruler.annotations | object | {} | Annotations to add to the Thanos Ruler resources |
| thanos.ruler.enabled | bool | false | Enable Thanos Ruler components |
| thanos.ruler.evaluationInterval | string | "30s" | Interval between consecutive evaluations. |
| thanos.ruler.externalLabels | object | {} | External Labels to add to the Thanos Ruler (A default replica label thanos_ruler_replica will be always added as a label with the value of the pod’s name.) |
| thanos.ruler.externalPrefix | string | "/ruler" | Set Thanos Ruler external prefix |
| thanos.ruler.labels | object | {} | Labels to add to the ThanosRuler CustomResource |
| thanos.ruler.logLevel | string | info | Thanos Ruler log level |
| thanos.ruler.matchLabel | string | nil | PrometheusRule objects to be selected for rule evaluation |
| thanos.ruler.objectStorageConfig.existingSecret | object | {} | |
| thanos.ruler.replicaLabel | string | "thanos_ruler_replica" | Set Thanos Rule replica-label. Only change this when you also guarantee to add the same as an external label with a value of "$(POD_NAME)" |
| thanos.ruler.replicas | int | 1 | Set Thanos Ruler replica count |
| thanos.ruler.resources | object | ressources: requests: memory: cpu: limits: memory: cpu: | Resource requests and limits for the Thanos Ruler container. |
| thanos.ruler.retention | string | "24h" | Time duration ThanosRuler shall retain data for. Default is ‘24h’, and must match the regular expression [0-9]+(ms |
| thanos.ruler.securityContext | object | {"fsGroup":2000,"runAsGroup":2000,"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}} | SecurityContext holds pod-level security attributes and common container settings. |
| thanos.ruler.serviceAnnotations | object | {} | Service specific annotations to add to the Thanos Ruler service in addition to its already configured annotations. |
| thanos.ruler.serviceLabels | object | {} | Labels to add to the Thanos Ruler service |
| thanos.ruler.storage | object | {} | |
| thanos.serviceMonitor.alertLabels | string | alertLabels: | support_group: “default” meta: "" | Labels to add to the PrometheusRules alerts. |
| thanos.serviceMonitor.dashboards | bool | true | Create configmaps containing Perses dashboards |
| thanos.serviceMonitor.labels | object | {} | Labels to add to the ServiceMonitor/PrometheusRules. Make sure label is matching your Prometheus serviceMonitorSelector/ruleSelector configs by default Greenhouse kube-monitoring follows this label pattern plugin: "{{ $.Release.Name }}" |
| thanos.serviceMonitor.selfMonitor | bool | false | Create a ServiceMonitor and PrometheusRules for Thanos components. Disabled by default since label is required for Prometheus serviceMonitorSelector/ruleSelector. |
| thanos.store.additionalArgs | list | [] | Adding additional arguments to Thanos Store |
| thanos.store.annotations | object | {} | Annotations to add to the Thanos Store resources |
| thanos.store.chunkPoolSize | string | 4GB | Set Thanos Store chunk-pool-size |
| thanos.store.containerLabels | object | {} | Labels to add to the Thanos Store container |
| thanos.store.deploymentLabels | object | {} | Labels to add to the Thanos Store deployment |
| thanos.store.enabled | bool | true | Enable Thanos Store component |
| thanos.store.indexCacheSize | string | 1GB | Set Thanos Store index-cache-size |
| thanos.store.logLevel | string | info | Thanos Store log level |
| thanos.store.resources | object | ressources: requests: memory: cpu: limits: memory: cpu: | Resource requests and limits for the Thanos Store container. |
| thanos.store.serviceAnnotations | object | {} | Service specific annotations to add to the Thanos Store service in addition to its already configured annotations. |
| thanos.store.serviceLabels | object | {} | Labels to add to the Thanos Store service |
5 - Contribute
The Greenhouse core platform serves as a comprehensive cloud operations solution, providing centralized control and management for cloud infrastructure and applications.
Its extensibility is achieved through the development and integration of plugins, allowing organizations to adapt and enhance the platform to accommodate their specific operational needs, ultimately promoting efficiency and compliance across their cloud environments.
The Greenhouse team welcomes all contributions to the project.
5.1 - Local development setup
What is Greenhouse?
Greenhouse is a Kubernetes operator build with Kubebuilder and a UI on top of the k8s API.
It expands the Kubernetes API via CustomResourceDefinitions. The different aspects of the CRDs are reconciled by several controllers. It also acts as an admission webhook.
The Greenhouse Dashboard is a UI acting on the k8s apiserver of the cluster Greenhouse is running in. The UI itself is a Juno application containing several micro frontends.
Greenhouse provides a couple of cli commands based on make to run a local Greenhouse instance.
- Setting up the development environment
- Run local Greenhouse
- Developing Greenhouse core functionality:
- Greenhouse Dashboard
- Greenhouse Extensions
- Additional information
This handy CLI tool will help you to setup your development environment in no time.
Prerequisites
Usage
Build greenhousectl from source by running the following command: make cli
[!NOTE]
The CLI binary will be available in thebinfolder
Setting up the development environment
There are multiple local development environment setup available for the Greenhouse project. You can choose the one that fits your needs.
All commands will spin up KinD clusters and setup the necessary components
If you have a ~/.kube/config file then KinD will automatically merge the kubeconfig of the created cluster(s).
Use kubectl config use-context kind-greenhouse-admin to switch to greenhouse admin cluster context.
Use kubectl config use-context kind-greenhouse-remote to switch to greenhouse remote cluster context.
If you do not have the contexts of the created cluster(s) in ~/.kube/config file then you can extract it from the
operating system’s tmp folder, where the CLI will write kubeconfig of the created KinD clusters.
[!NOTE]
linux / macOS: inunixlike systems you can find thekubeconfigat$TMPDIR/greenhouse/<clusterName>.kubeconfig
windows: inwindowsmany tmp folders exist so the CLI can write thekubeconfigto the first non-empty value from%TMP%,%TEMP%,%USERPROFILE%The path where the
kubeconfigis written will be displayed in the terminal after the command is executed by the CLI
use kubectl --kubeconfig=<path to admin / remote kubeconfig> to interact with the local greenhouse clusters
Run Greenhouse Locally
make setup
- This will install the operator, the dashboard, cors-proxy and a sample organization with an onboarded remote cluster
- port-forward the
cors-proxybykubectl port-forward svc/greenhouse-cors-proxy 9090:80 -n greenhouse & - port-forward the
dashboardbykubectl port-forward svc/greenhouse-dashboard 5001:80 -n greenhouse & - Access the local
demoorganization on the Greenhouse dashboard on localhost:5001
Develop Controllers locally and run the webhook server in-cluster
make setup-controller-dev
[!NOTE] set the environment variable
CONTROLLERS_ONLY=truein your debugger configurationIf no environment variable is set, the webhook server will error out due to the missing certs
Develop Admission Webhook server locally
make setup-webhook-dev
[!NOTE] set the environment variable
WEBHOOK_ONLY=truein your debugger configuration if you only want to run the webhook server
Develop Controllers and Admission Webhook server locally
WITH_CONTROLLERS=false DEV_MODE=true make setup-manager
This will modify the ValidatingWebhookConfiguration and MutatingWebhookConfiguration to use the
host.docker.internal (macOS / windows) or ipv4 (linux) address for the webhook server and write the
webhook certs to /tmp/k8s-webhook-server/serving-certs.
Now you can run the webhook server and the controllers locally
Since both need to be run locally no CONTROLLERS_ONLY or WEBHOOK_ONLY environment variables are needed in your
debugger configuration
[!NOTE] The dev setup will modify the webhook configurations to have 30s timeout for the webhook requests, but when break points are used to debug webhook requests, it can result into timeouts. In such cases, modify the CR with a dummy annotation to re-trigger the webhook request and reconciliation
Running Greenhouse Dashboard in-cluster
make setup-dashboard
[!NOTE] You will need to port-forward the cors-proxy service and the dashboard service to access the dashboard
Information on how to access the dashboard is displayed after the command is executed
Run Greenhouse Core for UI development
The Greenhouse UI consists of a Juno application hosting several micro frontends (MFEs). To develop the UI you will need a local Greenhouse cluster api-server as backend for your local UI:
- Startup the environment as in Run local Greenhouse
- The Greenhouse UI expects an
appProps.jsonwith the necessary parameters to run - This
appProps.jsonConfigMapis created in thegreenhousenamespace by the local installation to configure the in-cluster dashboard. - You can
- either create and use your own
appProps.jsonfile when running the UI locally - or retrieve the generated
appProps.jsonin-cluster by executingkubectl get cm greenhouse-dashboard-app-props -n greenhouse -o=json | jq -r '.data.["appProps.json"]'
- either create and use your own
- After port-forwarding
cors-proxyservice, it should be used asapiEndpointinappProps.json - Start the dashboard locally (more information on how to run the dashboard locally can be found in the Juno Repository)
Test Plugin / Greenhouse Extension charts locally
PLUGIN_DIR=<absolute-path-to-charts-dir> make setup
- This will install a full running setup of operator, dashboard, sample organization with an onboarded remote cluster
- Additionally, it will mount the plugin charts directory on to the
nodeof theKinDcluster - The operator deployment has a hostPath volume mount to the plugin charts directory from the
nodeof theKinDcluster
To test your local Chart (now mounted to the KinD cluster) with a plugindefinition.yaml you would need to adjust .spec.helmChart.name to use the local chart.
With the provided mounting mechanism it will always live in local/plugins/ within the KinD cluster.
Modify spec.helmChart.name to point to the local file path of the chart that needs to be tested
Example Scenario:
You have cloned the Greenhouse Extensions repository,
and you want to test cert-manager plugin chart locally.
apiVersion: greenhouse.sap/v1alpha1
kind: PluginDefinition
metadata:
name: cert-manager
spec:
description: Automated TLS certificate management
displayName: Certificate manager
docMarkDownUrl: >-
https://raw.githubusercontent.com/cloudoperators/greenhouse-extensions/main/cert-manager/README.md
helmChart:
name: 'local/plugins/<path-to-cert-manager-chart-folder>'
repository: '' # <- has to be empty
version: '' # <- has to be empty
...
Apply the plugindefinition.yaml to the admin cluster
kubectl --kubeconfig=<your-kind-config> apply -f plugindefinition.yaml
Additional information
When setting up your development environment, certain resources are modified for development convenience.
- The Greenhouse controllers and webhook server deployments use the same image to run. The logic is separated by environment variables.
- The
greenhouse-controller-managerdeployment has environment variableCONTROLLERS_ONLYCONTROLLERS_ONLY=truewill only run the controllers- changing the value to
falsewill run the webhook server and will error out due to missing certs
- The
greenhouse-webhookdeployment has environment variableWEBHOOK_ONLYWEBHOOK_ONLY=truewill only run the webhook server- changing the value to
falsewill skip the webhook server. When greenhouseCustomResourcesare applied, the Kubernetes Validating and Mutating Webhook phase will error out due to webhook endpoints not being available
if DevMode is enabled for webhooks then depending on the OS the webhook manifests are altered by removing
clientConfig.service and replacing it with clientConfig.url, allowing you to debug the code locally.
linux- the ipv4 addr fromdocker0interface is used - ex:https://172.17.0.2:9443/<path>macOS- host.docker.internal is used - ex:https://host.docker.internal:9443/<path>windows- ideallyhost.docker.internalshould work, otherwise please reach out with a contribution <3- webhook certs are generated by
cert-managerin-cluster, and they are extracted and saved to/tmp/k8s-webhook-server/serving-certs kubeconfigof the created cluster(s) are saved to/tmp/greenhouse/<clusterName>.kubeconfig
greenhousectl dev setup
setup dev environment with a configuration file
greenhousectl dev setup [flags]
Examples
# Setup Greenhouse dev environment with a configuration file
greenhousectl dev setup -f dev-env/dev.config.yaml
- This will create an admin and a remote cluster
- Install CRDs, Webhook definitions, RBACs, Certs, etc... for Greenhouse into the admin cluster
- Depending on the devMode, it will install the webhook in-cluster or enable it for local development
Overriding certain values in dev.config.yaml:
- Override devMode for webhook development with d=true or devMode=true
- Override helm chart installation with c=true or crdOnly=true
e.g. greenhousectl dev setup -f dev-env/dev.config.yaml d=true
Options
-f, --config string configuration file path - e.g. -f dev-env/dev.config.yaml
-h, --help help for setup
greenhousectl dev setup dashboard
setup dashboard for local development with a configuration file
greenhousectl dev setup dashboard [flags]
Examples
# Setup Greenhouse dev environment with a configuration file
greenhousectl dev setup dashboard -f dev-env/ui.config.yaml
- Installs the Greenhouse dashboard and CORS proxy into the admin cluster
Options
-f, --config string configuration file path - e.g. -f dev-env/ui.config.yaml
-h, --help help for dashboard
Generating Docs
To generate the markdown documentation, run the following command:
make dev-docs
5.2 - Contributing a Plugin
What is a Plugin?
A Plugin is a key component that provides additional features, functionalities and may add new tools or integrations to the Greenhouse project.
They are developed de-centrally by the domain experts.
A YAML specification outlines the components that are to be installed and describes mandatory and optional, instance-specific configuration values.
It can consist of two main parts:
Juno micro frontend
This integrates with the Greenhouse dashboard, allowing users to interact with the Plugin’s features seamlessly within the Greenhouse UI.Backend component
It can include backend logic that supports the Plugin’s functionality.
Contribute
Additional ideas for plugins are very welcome!
The Greenhouse plugin catalog is defined in the Greenhouse extensions repository.
To get started, please file an issues and provide a concise description of the proposed plugin here.
A Greenhouse plugin consists of a juno micro frontend that integrates with the Greenhouse UI and/or a backend component described via Helm chart.
Contributing a plugin requires the technical skills to write Helm charts and proficiency in JavaScript.
Moreover, documentation needs to be developed to help users understand the plugin capabilities as well as how to incorporate it.
Additionally, the plugin needs to be maintained by at least one individual or a team to ensure ongoing functionality and usability within the Greenhouse ecosystem.
Development
Developing a plugin for the Greenhouse platform involves several steps, including defining the plugin, creating the necessary components, and integrating them into Greenhouse.
Here’s a high-level overview of how to develop a plugin for Greenhouse:
Define the Plugin:
- Clearly define the purpose and functionality of your plugin.
- What problem does it solve, and what features will it provide?
Plugin Definition (plugindefinition.yaml):
- Create a
plugindefinition.yaml(API Reference) file in the root of your repository to specify the plugin’s metadata and configuration options. This YAML file should include details like the plugin’s description, version, and any configuration values required. - Provide a list of
PluginOptionswhich are values that are consumed to configure the actualPlugininstance of yourPluginDefinition. Greenhouse always provides some global values that are injected into yourPluginupon deployment:global.greenhouse.organizationName: Thenameof yourOrganizationglobal.greenhouse.teamNames: All availableTeamsin yourOrganizationglobal.greenhouse.clusterNames: All availableClustersin yourOrganizationglobal.greenhouse.clusterName: Thenameof theClusterthisPlugininstance is deployed to.global.greenhouse.baseDomain: The base domain of your Greenhouse installationglobal.greenhouse.ownedBy: The owner (usually a owningTeam) of thisPlugininstance
- Create a
Plugin Components:
- Develop the plugin’s components, which may include both frontend and backend components.
- For the frontend, you can use Juno microfrontend components to integrate with the Greenhouse UI seamlessly.
- The backend component handles the logic and functionality of your plugin. This may involve interacting with external APIs, processing data, and more.
Testing & Validation:
- Test your plugin thoroughly to ensure it works as intended. Verify that both the frontend and backend components function correctly.
- Implement validation for your plugin’s configuration options. This helps prevent users from providing incorrect or incompatible values.
- Implement Helm Chart Tests for your plugin if it includes a Helm Chart. For more information on how to write Helm Chart Tests, please refer to this guide.
Documentation:
- Create comprehensive documentation for your plugin. This should include installation instructions, configuration details, and usage guidelines.
Integration with Greenhouse:
- Integrate your plugin with the Greenhouse platform by configuring it using the Greenhouse UI. This may involve specifying which organizations can use the plugin and setting up any required permissions.
Publishing:
- Publish your plugin to Greenhouse once it’s fully tested and ready for use. This makes it available for organizations to install and configure.
Support and Maintenance:
- Provide ongoing support for your plugin, including bug fixes and updates to accommodate changes in Greenhouse or external dependencies.
Community Involvement:
- Consider engaging with the Greenhouse community, if applicable, by seeking feedback, addressing issues, and collaborating with other developers.
5.3 - Greenhouse Controller Development
Bootstrap a new Controller
Before getting started please make sure you have read the contribution guidelines.
Greenhouse is build using Kubebuilder as the framework for Kubernetes controllers. To create a new controller, you can use the kubebuilder CLI tool.
This project was generated with Kubebuilder v4. It’s necessary to create a symlink from
cmd/greenhouse/main.gotocmd/main.goin to run the Kubebuider scaffolding commands.
ln $(pwd)/cmd/greenhouse/main.go $(pwd)/cmd/main.go
To create a new controller, run the following command:
kubebuilder create api --group greenhouse --version v1alpha1 --kind MyResource
Now that the files have been generated, they need to be copied to the correct location. The generated files are located in api/greenhouse/v1alpha1 and controller/greenhouse. The correct locations for the files are api/v1alpha1 and pkg/controller/<kind> respectively.
After moving the files, any imports need to be updated to point to the new locations.
Also ensure that the entry for the resource in the PROJECT file points to the correct location.
The new Kind should be added to the list under charts/manager/crds/kustomization.yaml
The new Controller needs to be registered in the controllers manager cmd/greenhouse/main.go.
All other generated files can be deleted.
Now you can generate all manifests with make manifests and start implementing your controller logic.
Implementing the Controller
Within Greenhouse the controllers implement the lifecycle.Reconciler interface. This allows for consistency between the controllers and ensures finalizers, status updates and other common controller logic is implemented in a consistent way. For examples on how this is used please refer to the existing controllers.
Testing the Controller
Unit/Integration tests for the controllers use Kubebuilder’s envtest environment and are implemented using Ginkgo and Gomega. For examples on how to write tests please refer to the existing tests. There are also some helper functions in the internal/test package that can be used to simplify the testing of controllers.
For e2e tests, please refer to the test/e2e/README.md.
6 -
All ADRs have been migrated to cloudoperators/documentation.
7 -
Greenhouse documentation
This directory contains the documentation for Greenhouse, the Day-2 operations platform.
All directories containing an _index.md with the following content are synchronized to the website.
---
title: "<title>"
linkTitle: "<link>"
landingSectionIndex: <true|false>
description: >
<Long description of the content>
---
You can execute the following command to serve the documentation locally:
make serve-docs