Available Customizations
Application YAML can be customized, but which customizations can you do and why would you customize? Take a look below for the answers.
Why Customize?
Your environment and provider combined with various image locations or security requirements might dictate the why behind customizing your Applications.
Enable certain images
Provide more storage
Bump memory resources
Depending on which level you need your customizations, determines the “how”. Refer to the pages that follow for specifics about how to customize your Applications.
How do I Customize?
Number one, create a ConfigMap
. A ConfigMap
allows you to decouple environment-specific configuration from your container images, so that your applications are easily portable. Use a ConfigMap
to set configuration data that is separate from the Application code. Provide the name of a ConfigMap
in the AppDeployment
, which provides custom configuration on top of the default configuration.
This is an example, of how to customize the AppDeployment
of Kube Prometheus Stack:
Create the
ConfigMap
which provides the custom configuration on top of the default configuration:CODEcat <<EOF | kubectl apply -f - apiVersion: v1 kind: ConfigMap metadata: namespace: ${WORKSPACE_NAMESPACE} name: kube-prometheus-stack-overrides-attached data: values.yaml: | prometheus: prometheusSpec: storageSpec: volumeClaimTemplate: spec: resources: requests: storage: 150Gi EOF
Provide the name of a
ConfigMap
with the custom configuration in theAppDeployment
. Override the default configuration of an Application by setting theconfigOverrides
field on theAppDeployment
to thatConfigMap
.CODEcat <<EOF | kubectl apply -f - apiVersion: apps.kommander.d2iq.io/v1alpha3 kind: AppDeployment metadata: name: kube-prometheus-stack namespace: ${WORKSPACE_NAMESPACE} spec: appRef: name: kube-prometheus-stack-46.8.0 kind: ClusterApp configOverrides: name: kube-prometheus-stack-overrides-attached EOF
The changes are applied only if the YAML file has a valid syntax.
Set up only one cluster override
ConfigMap
per cluster. If there are severalConfigMaps
configured for a cluster, only one will be applied.Cluster override
ConfigMaps
must be created on the Management cluster.