The examples below illustrate the use of Resource Definitions to realize a particular capability.
An example may contain several Resource Definitions working in conjunction.
These Resource Definitions may be of different Resource Types . Therefore, there is not always a one-to-one relationship of capability to Resource Type. Refer to the description of the individual examples for details.
The
workload
Resource Type can be used to make updates to resources before they are deployed into the cluster. In this example, a Resource Definition implementing the
workload
Resource Type is used to inject the Open Telemetry agent as a sidecar into every workload. In addition to adding the sidecar, it also adds an environment variable called OTEL_EXPORTER_OTLP_ENDPOINT
to each container running in the workload.
(...)
This section contains example Resource Definitions using the
Template Driver
for the
affinity
of Kubernetes Pods.
(...)
This section contains example Resource Definitions using the
Humanitec Agent
for connecting to AKS clusters.
(...)
This section contains example Resource Definitions using the
Humanitec Agent
for connecting to EKS clusters.
(...)
This section contains example Resource Definitions using the
Humanitec Agent
for connecting to GKE clusters.
(...)
This section shows how to use the
Template Driver
for managing
annotations
on Kubernetes objects.
(...)
GitLab implements
the
Terraform HTTP backend
. In order to use the Terraform backend in GitLab, the following is needed:
(...)
The Backend is configured using the
backend
block. A config
resource holds the key configuration for the backend.
(...)
This section contains an example of Resource Definitions using the
Terraform Driver
and illustrating the
co-provisioning
concept.
(...)
This section contains example Resource Definitions using static credentials for connecting to AKS clusters.
(...)
This section contains example Resource Definitions using static credentials for connecting to EKS clusters.
(...)
This section contains example Resource Definitions using static credentials for connecting to a Git repository in (
GitOps mode
).
(...)
This section contains example Resource Definitions using static credentials for connecting to GKE clusters.
(...)
This section contains example Resource Definitions using static credentials for connecting to generic Kubernetes clusters.
(...)
Different
Terraform providers
have different ways of being configured. Generally, there are 3 ways that providers can be configured:
(...)
This section contains an example of providing a custom git-config to be used by Terraform when accessing modules sources from private git repositories.
(...)
This section contains example Resource Definitions using the
Template Driver
for creating a
endpoint
resource.
(...)
This section contains example Resource Definitions for using
External DNS
and
Cert Manager
by setting annotations in the
Ingress
(...)
This section contains a Resource Definition example for handling Kubernetes
HorizontalPodAutoscaler
by using the
hpa
Driver. If you have special requirements for your HorizontalPodAutoscaler
implementation, you can
see this other example using the template
Driver
.
(...)
This section contains a Resource Definition example for handling Kubernetes
HorizontalPodAutoscaler
by using the
template
Driver to configure your own HorizontalPodAutoscaler
implementation. You can
see this other example
if you want to use the hpa
Driver.
(...)
This section shows how to use the
Template Driver
for configuring cluster access to a private container image registry.
(...)
This section contains example Resource Definitions for handling Kubernetes ingress traffic using the
Ingress
Driver.
(...)
The
Generic Async Driver
executes a container supplied as input as part of a Kubernetes Job execution in a target Kubernetes cluster.
(...)
This section contains example Resource Definitions using the
Echo Driver
for managing Kubernetes
namespaces
.
(...)
This section contains example Resource Definitions using the
Template Driver
for managing Kubernetes
namespaces
.
(...)
This example shows a sample usage of the
base-env
Resource Type. It is one of the implicit
Resource Types
that always gets provisioned for a Deployment.
(...)
This section contains example Resource Definitions using the
Template Driver
for setting
nodeSelectors
on your Pods.
(...)
This section contains example Resource Definitions using the
Echo Driver
for PostgreSQL.
(...)
The
Generic Async Driver
executes a container supplied as input as part of a Kubernetes Job execution in a target Kubernetes cluster.
(...)
The
Terraform Driver
can access Terraform definitions stored in a Git repository. In the case that this repository requires authentication, you must supply credentials to the Driver. The examples in this section show how to provide those as part of the
secrets
in the Resource Definition based on the Terraform Driver.
(...)
This example shows a sample usage of the
base-env
Resource Type. It is one of the implicit
Resource Types
that always gets provisioned for a Deployment.
(...)
The
Terraform Driver
can be configured to execute the Terraform scripts as part of a Kubernetes Job execution in a target Kubernetes cluster, instead of in the Humanitec infrastructure. In this case, you must supply access data to the cluster to the Humanitec Platform Orchestrator.
(...)
The
Terraform Driver
can be configured to execute the Terraform scripts as part of a Kubernetes Job execution in a target Kubernetes cluster, instead of in the Humanitec infrastructure. In this case, you must supply access data to the cluster to the Humanitec Platform Orchestrator.
(...)
This section contains example Resource Definitions for connecting to a Git repository to push application CRs in
GitOps mode
.
(...)
This section contains example Resource Definitions using the
Template Driver
for adding
Security Context on Kubernetes
Deployment
.
(...)
This section contains example Resource Definitions using the
Template Driver
for provisioning Kubernetes
ServiceAccounts
for your Workloads.
(...)
This section contains example Resource Definitions using the
Template Driver
for managing
TLS Certificates
in your cluster.
(...)
This section contains example Resource Definitions using the
Template Driver
for managing
tolerations
on your Pods.
(...)
This section contains Resource Definition examples for handling Kubernetes
Volumes
by using the
template
Driver to configure your own PersistentVolume
implementation. You can
see this other example
if you want to use the volume-pvc
Driver.
(...)
This section contains Resource Definitions examples for handling Kubernetes
Volumes
by using the
volume-pvc
Driver. If you have special requirements for your PersistentVolume
implementation, you can
see this other example using the template
Driver
.
(...)
Wildcard Dns
DNS
This section contains example Resource Definitions using the
Wildcard DNS Driver
returning an externally managed DNS record for routing and ingress inside the cluster.
(...)