Comments (11)
#694 provides one approach to doing this via the Helm chart alone (for the default job template). Although this works, I am not convinced it is ideal (but possibly good enough).
Off the top of my head, the cleanest approach is to have a way to add a list of labels and annotations to the operator config so that if they are defined, the operator will add those to any object that it creates.
That being said, this PR works by only changing the chart and not touching the Testkube code.
from helm-charts.
@spkane technically, operator can use cronjob template filed from Test CRD and adjust created con jobs. What other resouces do you need to modify?
from helm-charts.
@spkane technically, operator can use cronjob template filed from Test CRD and adjust created con jobs. What other resouces do you need to modify?
@vsukhin I am not sure exactly what you are suggesting here.
At the moment, we only need to modify the test jobs that are being created by the operator, but in general, I would say that we want to be able to tell the operator to apply a specific annotation to ALL objects that it creates in the cluster, and if one is going to support this, it makes sense to simply allow a list of annotations and labels to be defined and applied.
from helm-charts.
Right now, operator creates only cron jobs and you can adjust them using labels and annotations. We will suppport this for any new objects we will create in operator
from helm-charts.
@spkane Can you share which of the two options you're using as a workaround for now? We're evaluating testkube in combination with ArgoCD and are running into the same issues:
- Maintain a complete custom job template while keeping it up to date with any upstream changes
- Overriding and adding the ArgoCD annotations on each and every test
@vsukhin
As a way forward and seeing that #694 could break existing installations and is therefore not likely get merged. How about the following?
Looking at the implementation there is a difference between how job template configurations are handled:
- the job template overridable via Helm must be a complete definition
- whereas the job template extension configured via Test CR is merged into the existing rendered YAML as a patch
How about reusing the patch mechanism and allow defining a job patch in the Helm chart as well?
Then the final job YAML would be: job template + job patch from Helm + job patch from Test CR
- Existing installations are not impacted
- The patch mechanism can be reused
- We can define our installation wide overrides once (DRY) - e.g., to add required ArgoCD annotations
from helm-charts.
@frederikb Sounds like a good idea, I support it
from helm-charts.
@frederikb We ended up going with simply adding the ArgoCD annotation patch into each test since it was annoying, but much less work in the end than trying to fork the helm charts.
I like your idea for handling this, although it will probably require applying the patches in a well-known order, so the merge behavior is consistent, but it is certainly cleaner than #694, which shouldn't break anything, but is mostly a hack.
The core problem here is that the test Job template is a Go template used directly by the operator and not a helm template. Another approach to solving this problem might be to support passing in additional key/value pairs to the operator via the Helm manifest which it can then use with the go template, instead of trying to mix Helm templating with Go templating.
from helm-charts.
Related Issues (20)
- Make cronjob-template.yaml overridable HOT 4
- global.imageRegistry is not taken into account for all images HOT 7
- Ingress ClassName for helm chart 1.15.28 HOT 1
- testkube-operator-controller-manager proxy container image doesn't support arm64 HOT 1
- feat: (testkube-api) All job templates should be configurable as cleartext HOT 4
- apiServerEndpoint and internal cluster svc HOT 2
- Allow PathType for ingress to be defined other than Prefix HOT 1
- Documentation for Installation und Maintenance of Testkube via GitOps and ArgoCD HOT 1
- testkube-api-server pod keep print error log HOT 2
- Cannot load tests and testsuites after unintall and install helm without remove pvc HOT 6
- creating tests in different namespaces HOT 7
- Scheduling test does not work HOT 3
- Make the artifacts volume size configurable HOT 2
- Custom cronjobs template HOT 10
- Add capability to limit the ValidatingWebhookConfiguration to a single namespace. HOT 2
- Add the possibility to globally set tolerations and nodeSelector HOT 3
- testkube-playwright-executor error on arm64/aarch64 HOT 8
- Secrets
- Global values.yaml limit test creation source to only GIT for all test types. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helm-charts.