Comments (3)
You could make the counter argument.
If both are present, the project is likely transitioning from kubectl to qbec
I think as long as there are 2 annotations potentially in conflict, picking any one will always cause some case to fail.
I think what we need is the ability for qbec to use kubectl annotations when configured for a qbec app. That is, a flag in the qbec spec that says:
impersonateKubectl: true
and if this is set qbec always writes a kubectl.kubernetes.io/last-applied-configuration
annotation instead of the qbec one.
qbec already has the logic to read its own annotation and then kubectl's,. This is preserved as before.
For brand-new projects everything works the same except that qbec is writing the kubectl annotation and reading (as a 2 step process since the qbec version won't exist) it.
qbec should also have the logic to remove any qbec annotation that was present in the object when the project says it wants to impersonate kubectl and remove it going forward.
For a project that wants to transition to this, we need to document the migration process. This is, roughly,
- do not add the flag, apply using qbec one time such that the qbec annotation is the latest version
- add the flag and re-apply
- this will cause qbec to compute diffs based on its annotation, delete it and use the kubectl version on apply so that subsequent runs are clean
from qbec.
I think as long as there are 2 annotations potentially in conflict, picking any one will always cause some case to fail.
That's not fully true, as the only case when both of them are existing is when kubectl is used over qbec. The purposed change should not break anything but it will consider the changes made by hand via kubectl.
I think what we need is the ability for qbec to use kubectl annotations when configured for a qbec app. That is, a flag in the qbec spec that says:
impersonateKubectl: true
and if this is set qbec always writes a kubectl.kubernetes.io/last-applied-configuration annotation instead of the qbec one.
What the reason we need qbec annotation then why not always using kubectl annotation instead?
from qbec.
@gotwarlost do you want to generate and write kubectl.kubernetes.io/last-applied-configuration
annotation by qbec, right?
It would need some additional modifications in method as kubectl applies the namespace name there.
from qbec.
Related Issues (20)
- Don't show usage help output when there's an actual error to report. HOT 3
- qbec validate should do a server-side dry-run HOT 2
- re-enable integration tests
- display namespace name when querying objects for GC
- qbec fail on lists Secrets from k8s cluster HOT 2
- check api-version when renderedChart
- cannot build current version HOT 1
- Expose datasource variables __DS_PATH__ and __DS_NAME__ to exec command configuration HOT 16
- Add ability to use datasource with qbec eval when no env is specified
- Add flag to include/exclude components by namespace HOT 3
- Brew warnings in qbec tap HOT 3
- component dependency
- Remove commented out test assertion
- Build from forks show up on the main repo
- Docs site needs to be published to uptake changes HOT 1
- qbec fmt panics on malformed jsonnet string
- why does expandHelmTemplate deprecated HOT 4
- `qbec apply` failing to sync while waiting on custom type HOT 3
- Integrate qbec repo with the CLA assistant HOT 5
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 qbec.