crossplane

by Helm

Helm chartv2.1.1App 2.1.1Apache-2.0

Crossplane is an open source Kubernetes add-on that enables platform teams to assemble infrastructure from multiple vendors, and expose higher level self-service APIs for application teams to consume.

About this chart

Crossplane can be easily installed into any existing Kubernetes cluster using the regularly published Helm chart. The Helm chart contains all the custom resources and controllers needed to deploy and configure Crossplane.

Pre-requisites

Installation

Helm charts for Crossplane are currently published to the stable and master channels.

Stable

The stable channel is the most recent release of Crossplane that is considered ready for the community.

kubectl create namespace crossplane-system

helm repo add crossplane-stable https://charts.crossplane.io/stable
helm repo update

helm install crossplane --namespace crossplane-system crossplane-stable/crossplane

Master

The master channel contains the latest commits, with all automated tests passing. master is subject to instability, incompatibility, and features may be added or removed without much prior notice. It is recommended to use one of the more stable channels, but if you want the absolute newest Crossplane installed, then you can use the master channel.

To install the Helm chart from master, you will need to pass the specific version returned by the search command:

kubectl create namespace crossplane-system
helm repo add crossplane-master https://charts.crossplane.io/master/
helm repo update
helm search repo crossplane-master --devel

helm install crossplane --namespace crossplane-system crossplane-master/crossplane --devel --version <version>

Uninstalling the Chart

To uninstall/delete the crossplane deployment:

helm delete crossplane --namespace crossplane-system

That command removes all Kubernetes components associated with Crossplane, including all the custom resources and controllers.

Configuration

The following tables lists the configurable parameters of the Crossplane chart and their default values.

ParameterDescriptionDefault
affinityAdd affinities to the Crossplane pod deployment.{}
argsAdd custom arguments to the Crossplane pod.[]
configuration.packagesA list of Configuration packages to install.[]
customAnnotationsAdd custom annotations to the Crossplane pod deployment.{}
customLabelsAdd custom labels to the Crossplane pod deployment.{}
deploymentStrategyThe deployment strategy for the Crossplane and RBAC Manager pods."RollingUpdate"
dnsPolicySpecify the dnsPolicy to be used by the Crossplane pod.""
extraEnvVarsCrossplaneAdd custom environmental variables to the Crossplane pod deployment application container. Replaces any . in a variable name with _. For example, SAMPLE.KEY=value1 becomes SAMPLE_KEY=value1.{}
extraEnvVarsCrossplaneInitAdd custom environmental variables to the Crossplane pod deployment init container. Replaces any . in a variable name with _. For example, SAMPLE.KEY=value1 becomes SAMPLE_KEY=value1.{}
extraEnvVarsRBACManagerAdd custom environmental variables to the RBAC Manager pod deployment. Replaces any . in a variable name with _. For example, SAMPLE.KEY=value1 becomes SAMPLE_KEY=value1.{}
extraObjectsTo add arbitrary Kubernetes Objects during a Helm Install[]
extraVolumeMountsCrossplaneAdd custom volumeMounts to the Crossplane pod.{}
extraVolumesCrossplaneAdd custom volumes to the Crossplane pod.{}
function.packagesA list of Function packages to install[]
functionCache.mediumSet to Memory to hold the function cache in a RAM backed file system. Useful for Crossplane development.""
functionCache.pvcThe name of a PersistentVolumeClaim to use as the function cache. Disables the default function cache emptyDir Volume.""
functionCache.sizeLimitThe size limit for the function cache. If medium is Memory the sizeLimit can't exceed Node memory."512Mi"
hostNetworkEnable hostNetwork for the Crossplane deployment. Caution: enabling hostNetwork grants the Crossplane Pod access to the host network namespace. Consider setting dnsPolicy to ClusterFirstWithHostNet.false
image.ignoreTagDo not use the {{ .image.tag }} value to compute the image uri.false
image.pullPolicyThe image pull policy used for Crossplane and RBAC Manager pods."IfNotPresent"
image.repositoryRepository for the Crossplane pod image."xpkg.crossplane.io/crossplane/crossplane"
image.tagThe Crossplane image tag. Defaults to the value of appVersion in Chart.yaml.""
imagePullSecretsThe imagePullSecret names to add to the Crossplane ServiceAccount.[]
leaderElectionEnable leader election for the Crossplane pod.true
metrics.enabledEnable Prometheus path, port and scrape annotations and expose port 8080 for both the Crossplane and RBAC Manager pods.false
metrics.portThe port the metrics server listens on.""
nodeSelectorAdd nodeSelectors to the Crossplane pod deployment.{}
packageCache.configMapThe name of a ConfigMap to use as the package cache. Disables the default package cache emptyDir Volume.""
packageCache.mediumSet to Memory to hold the package cache in a RAM backed file system. Useful for Crossplane development.""
packageCache.pvcThe name of a PersistentVolumeClaim to use as the package cache. Disables the default package cache emptyDir Volume.""
packageCache.sizeLimitThe size limit for the package cache. If medium is Memory the sizeLimit can't exceed Node memory."20Mi"
podSecurityContextCrossplaneAdd a custom securityContext to the Crossplane pod.{}
podSecurityContextRBACManagerAdd a custom securityContext to the RBAC Manager pod.{}
priorityClassNameThe PriorityClass name to apply to the Crossplane and RBAC Manager pods.""
provider.defaultActivationsDefine entries for the default managed resource activation policy. If defined, a default MRAP will contain these activations.["*"]
provider.packagesA list of Provider packages to install.[]
rbacManager.affinityAdd affinities to the RBAC Manager pod deployment.{}
rbacManager.argsAdd custom arguments to the RBAC Manager pod.[]
rbacManager.deployDeploy the RBAC Manager pod and its required roles.true
rbacManager.leaderElectionEnable leader election for the RBAC Manager pod.true
rbacManager.nodeSelectorAdd nodeSelectors to the RBAC Manager pod deployment.{}
rbacManager.replicasThe number of RBAC Manager pod replicas to deploy.1
rbacManager.revisionHistoryLimitThe number of RBAC Manager ReplicaSets to retain.nil
rbacManager.skipAggregatedClusterRolesDon't install aggregated Crossplane ClusterRoles.false
rbacManager.tolerationsAdd tolerations to the RBAC Manager pod deployment.[]
rbacManager.topologySpreadConstraintsAdd topologySpreadConstraints to the RBAC Manager pod deployment.[]
readiness.portThe port the readyz server listens on.""
registryCaBundleConfig.keyThe ConfigMap key containing a custom CA bundle to enable fetching packages from registries with unknown or untrusted certificates.""
registryCaBundleConfig.nameThe ConfigMap name containing a custom CA bundle to enable fetching packages from registries with unknown or untrusted certificates.""
replicasThe number of Crossplane pod replicas to deploy.1
resourcesCrossplane.limits.cpuCPU resource limits for the Crossplane pod."500m"
resourcesCrossplane.limits.memoryMemory resource limits for the Crossplane pod."1024Mi"
resourcesCrossplane.requests.cpuCPU resource requests for the Crossplane pod."100m"
resourcesCrossplane.requests.memoryMemory resource requests for the Crossplane pod."256Mi"
resourcesRBACManager.limits.cpuCPU resource limits for the RBAC Manager pod."100m"
resourcesRBACManager.limits.memoryMemory resource limits for the RBAC Manager pod."512Mi"
resourcesRBACManager.requests.cpuCPU resource requests for the RBAC Manager pod."100m"
resourcesRBACManager.requests.memoryMemory resource requests for the RBAC Manager pod."256Mi"
revisionHistoryLimitThe number of Crossplane ReplicaSets to retain.nil
runtimeClassNameThe runtimeClassName name to apply to the Crossplane and RBAC Manager pods.""
securityContextCrossplane.allowPrivilegeEscalationEnable allowPrivilegeEscalation for the Crossplane pod.false
securityContextCrossplane.readOnlyRootFilesystemSet the Crossplane pod root file system as read-only.true
securityContextCrossplane.runAsGroupThe group ID used by the Crossplane pod.65532
securityContextCrossplane.runAsUserThe user ID used by the Crossplane pod.65532
securityContextRBACManager.allowPrivilegeEscalationEnable allowPrivilegeEscalation for the RBAC Manager pod.false
securityContextRBACManager.readOnlyRootFilesystemSet the RBAC Manager pod root file system as read-only.true
securityContextRBACManager.runAsGroupThe group ID used by the RBAC Manager pod.65532
securityContextRBACManager.runAsUserThe user ID used by the RBAC Manager pod.65532
service.customAnnotationsConfigure annotations on the service object. Only enabled when webhooks.enabled = true{}
serviceAccount.createSpecifies whether Crossplane ServiceAccount should be createdtrue
serviceAccount.customAnnotationsAdd custom annotations to the Crossplane ServiceAccount.{}
serviceAccount.nameProvide the name of an already created Crossplane ServiceAccount. Required when serviceAccount.create is false""
tolerationsAdd tolerations to the Crossplane pod deployment.[]
topologySpreadConstraintsAdd topologySpreadConstraints to the Crossplane pod deployment.[]
webhooks.enabledEnable webhooks for Crossplane and installed Provider packages.true
webhooks.portThe port the webhook server listens on.""

Command Line

You can pass the settings with helm command line parameters. Specify each parameter using the --set key=value[,key=value] argument to helm install. For example, the following command will install Crossplane with an image pull policy of IfNotPresent.

helm install --namespace crossplane-system crossplane-stable/crossplane --set image.pullPolicy=IfNotPresent

Settings File

Alternatively, a yaml file that specifies the values for the above parameters (values.yaml) can be provided while installing the chart.

helm install crossplane --namespace crossplane-system crossplane-stable/crossplane -f values.yaml

Here are the sample settings to get you started.

replicas: 1

deploymentStrategy: RollingUpdate

image:
  repository: xpkg.crossplane.io/crossplane/crossplane
  tag: alpha
  pullPolicy: Always

Deploy crossplane with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has crossplane on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcrossplane is pinned at v2.1.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply