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
ConfigMapwhich 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 EOFProvide the name of a
ConfigMapwith the custom configuration in theAppDeployment. Override the default configuration of an Application by setting theconfigOverridesfield on theAppDeploymentto 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
ConfigMapper cluster. If there are severalConfigMapsconfigured for a cluster, only one will be applied.Cluster override
ConfigMapsmust be created on the Management cluster.