Skip to content

Commit

Permalink
Add vector tolerations for configCheck pod
Browse files Browse the repository at this point in the history
Add vector tolerations for configCheck pod
  • Loading branch information
zvlb committed Dec 15, 2022
2 parents 2c51044 + 6445b74 commit 4dc6c98
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
### Added

### v0.0.10
- [[73]](https://github.com/kaasops/vector-operator/pull/73) **Fix** Add vector tolerations for configCheck pod

### v0.0.9
- [[72]](https://github.com/kaasops/vector-operator/pull/72) **Feature** Add vp to all category
- [[71]](https://github.com/kaasops/vector-operator/pull/71) **Fix** Fix panic on empty sinks and sources
Expand Down
1 change: 1 addition & 0 deletions controllers/factory/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func ReconcileConfig(ctx context.Context, client client.Client, p pipeline.Pipel
vaCtrl.Vector.Namespace,
vaCtrl.Vector.Spec.Agent.Image,
vaCtrl.Vector.Spec.Agent.Env,
vaCtrl.Vector.Spec.Agent.Tolerations,
)

// Start ConfigCheck
Expand Down
27 changes: 15 additions & 12 deletions controllers/factory/config/configcheck/configcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ type ConfigCheck struct {
Client client.Client
ClientSet *kubernetes.Clientset

Name string
Namespace string
Image string
Envs []corev1.EnvVar
Hash string
Name string
Namespace string
Image string
Envs []corev1.EnvVar
Hash string
Tolerations []corev1.Toleration
}

func New(
Expand All @@ -51,15 +52,17 @@ func New(
cs *kubernetes.Clientset,
name, namespace, image string,
envs []corev1.EnvVar,
tolerations []corev1.Toleration,
) *ConfigCheck {
return &ConfigCheck{
Config: config,
Client: c,
ClientSet: cs,
Name: name,
Namespace: namespace,
Image: image,
Envs: envs,
Config: config,
Client: c,
ClientSet: cs,
Name: name,
Namespace: namespace,
Image: image,
Envs: envs,
Tolerations: tolerations,
}
}

Expand Down
1 change: 1 addition & 0 deletions controllers/factory/config/configcheck/configcheck_pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func (cc *ConfigCheck) createVectorConfigCheckPod() *corev1.Pod {
ServiceAccountName: "vector-configcheck",
Volumes: cc.generateVectorConfigCheckVolume(),
SecurityContext: &corev1.PodSecurityContext{},
Tolerations: cc.Tolerations,
Containers: []corev1.Container{
{
Name: "config-check",
Expand Down
1 change: 1 addition & 0 deletions controllers/vector_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ func createOrUpdateVector(ctx context.Context, client client.Client, clientset *
vaCtrl.Vector.Namespace,
vaCtrl.Vector.Spec.Agent.Image,
vaCtrl.Vector.Spec.Agent.Env,
vaCtrl.Vector.Spec.Agent.Tolerations,
)
err := configCheck.Run(ctx)
if errors.Is(err, configcheck.ValidationError) {
Expand Down
4 changes: 2 additions & 2 deletions helm/charts/vector-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.9
version: 0.0.10

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.0.9"
appVersion: "v0.0.10"

home: https://github.com/kaasops/vector-operator
sources:
Expand Down
25 changes: 19 additions & 6 deletions helm/index.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
apiVersion: v1
entries:
vector-operator:
- apiVersion: v2
appVersion: v0.0.10
created: "2022-12-15T16:29:49.262088+02:00"
description: A Helm chart to install Vector Operator
digest: f4398224ce88b852b319c950d0f39bfd5e6181801c1fac1b42b069dd2d358078
home: https://github.com/kaasops/vector-operator
name: vector-operator
sources:
- https://github.com/kaasops/vector-operator
type: application
urls:
- https://kaasops.github.io/vector-operator/helm/packages/vector-operator-0.0.10.tgz
version: 0.0.10
- apiVersion: v2
appVersion: v0.0.9
created: "2022-12-07T16:21:23.988277182+02:00"
created: "2022-12-15T16:29:49.264843+02:00"
description: A Helm chart to install Vector Operator
digest: 66c528b6daa9f6fb9a8dd91895b69151f3f0183f4685ba4a2bc026fac27f25a7
home: https://github.com/kaasops/vector-operator
Expand All @@ -16,7 +29,7 @@ entries:
version: 0.0.9
- apiVersion: v2
appVersion: v0.0.8
created: "2022-12-07T16:21:23.987759513+02:00"
created: "2022-12-15T16:29:49.264108+02:00"
description: A Helm chart to install Vector Operator
digest: 21c4c214cd0206abb743e82ac757804d644de08d80eb5f2edbb82ff9668cfed3
home: https://github.com/kaasops/vector-operator
Expand All @@ -29,7 +42,7 @@ entries:
version: 0.0.8
- apiVersion: v2
appVersion: v0.0.7
created: "2022-12-07T16:21:23.980769185+02:00"
created: "2022-12-15T16:29:49.263485+02:00"
description: A Helm chart to install Vector Operator
digest: 27915a2bf70da3f66d08cf4a1f6c41ad38937759ad52eaf8b19f5a3e348e2f2e
home: https://github.com/kaasops/vector-operator
Expand All @@ -42,7 +55,7 @@ entries:
version: 0.0.7
- apiVersion: v2
appVersion: v0.0.6
created: "2022-12-07T16:21:23.980285426+02:00"
created: "2022-12-15T16:29:49.262854+02:00"
description: A Helm chart to install Vector Operator
digest: 26760fbc2018336c12e8726307a624970ee994c4ffa021cc216c13669bd82f09
home: https://github.com/kaasops/vector-operator
Expand All @@ -55,7 +68,7 @@ entries:
version: 0.0.6
- apiVersion: v2
appVersion: v0.0.5
created: "2022-12-07T16:21:23.979780268+02:00"
created: "2022-12-15T16:29:49.261413+02:00"
description: A Helm chart to install Vector Operator
digest: 1d6034027ae2f08a9dbea4d6ee9a1604117ae44d9daceb3f654b87a99175251f
home: https://github.com/kaasops/vector-operator
Expand All @@ -66,4 +79,4 @@ entries:
urls:
- https://kaasops.github.io/vector-operator/helm/packages/vector-operator-0.0.1.tgz
version: 0.0.1
generated: "2022-12-07T16:21:23.979201567+02:00"
generated: "2022-12-15T16:29:49.260393+02:00"
Binary file added helm/packages/vector-operator-0.0.10.tgz
Binary file not shown.

0 comments on commit 4dc6c98

Please sign in to comment.