Skip to content
Snippets Groups Projects
Commit 34b1a9e3 authored by Benedikt Wetzel's avatar Benedikt Wetzel
Browse files

Add documentation for the *label patcher

parent 1ae4932e
No related branches found
No related tags found
1 merge request!239Add addional patcher to make it possible to set matchlabels
Pipeline #6556 passed
......@@ -53,6 +53,27 @@ Patchers can be seen as functions which take a value as input and modify a Kuber
* **resource**: "uc1-kstreams-deployment.yaml"
* **example value**: "random-scheduler"
* **LabelPatcher**: Changes the label of a Kubernetes Deployment or StatefulSet. The patches field is: `metadata.labels`
* **type**: "LabelPatcher"
* **resource**: "uc1-kstreams-deployment.yaml"
* **properties**:
* variableName: "app"
* **example value**: "theodolite-sut"
* **MatchLabelPatcher**: Changes the match labels of a Kubernetes Deployment or StatefulSet. The patches field is: `spec.selector.matchLabels`
* **type**: "MatchLabelPatcher"
* **resource**: "uc1-kstreams-deployment.yaml"
* **properties**:
* variableName: "app"
* **example value**: "theodolite-sut"
* **TemplateLabelPatcher**: Changes the template labels of a Kubernetes Deployment or StatefulSet. The patches field is: `spec.template.metadata.labels`
* **type**: "MatchLabelPatcher"
* **resource**: "uc1-kstreams-deployment.yaml"
* **properties**:
* variableName: "app"
* **example value**: "theodolite-sut"
* **ImagePatcher**: Changes the image of a Kubernetes resource. **Currently not fully implemented.**
* **type**: "ImagePatcher"
* **resource**: "uc1-kstreams-deployment.yaml"
......
......@@ -4,6 +4,12 @@ import io.fabric8.kubernetes.api.model.KubernetesResource
import io.fabric8.kubernetes.api.model.apps.Deployment
import io.fabric8.kubernetes.api.model.apps.StatefulSet
/**
* This patcher is able to set the `spec.selector.matchLabels` for a `Deployment` or `StatefulSet` Kubernetes resource.
*
* @property k8sResource The Kubernetes manifests to patch
* @property variableName The matchLabel which should be set
*/
class MatchLabelPatcher(private val k8sResource: KubernetesResource, val variableName: String) :
AbstractPatcher(k8sResource) {
......
......@@ -4,6 +4,12 @@ import io.fabric8.kubernetes.api.model.KubernetesResource
import io.fabric8.kubernetes.api.model.apps.Deployment
import io.fabric8.kubernetes.api.model.apps.StatefulSet
/**
* This patcher is able to set the field `spec.template.metadata.labels` for a `Deployment` or `StatefulSet` Kubernetes resource.
*
* @property k8sResource The Kubernetes manifests to patch
* @property variableName The label which should be set
*/
class TemplateLabelPatcher(private val k8sResource: KubernetesResource, val variableName: String) :
AbstractPatcher(k8sResource) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment