Comments (4)
This looks good to me.
minor - The Major.Minor versions do not match. The patch version is allowed to be different.
Should be minor - The Major.Minor versions match. The patch version is allowed to be different.
, right?
My only other thought is to think about if this will prove to be generically useful across mixins enough to consider placing somewhere in a/the main Porter repo such that it's inherited by any basic mixin implementation (maybe clientVersion
could be included at the same time). However, it doesn't quite fit in exec's builder pkg, where we've previously placed similar interfaces... so this would probably be a separate/broader design/discussion.
from kubernetes-mixin.
Oh we can tweak the wording. The sentence above was "A download is triggered when: ..." so the condition for triggering a download is when the Major.Minor doesn't match. But we can flip it to talk about matching instead, whatever is less confusing.
Some of the logic we are discussing here is specific to kubectl (such as the backwards compatibility) so we would want to use interfaces again like we have in the builder package to opt into various behaviors. So yeah I think it would work well to be a common package in porter. We can find a spot for it, maybe a subpackage under pkg/mixins/FEATURE would be a way to do it going forward. But that can be worked out in an issue in the Porter repo.
from kubernetes-mixin.
I really love the idea of configurable dynamic download and the adaptation of this feature to other mixins. Moreover, it could resolve this question about downloading user-defined mixins see: getporter/porter#975
I wonder when the download would happen. Is it at build-time or later at runtime? as a universal behavior
from kubernetes-mixin.
I'm glad you are interested in this path!
The dynamic installation of the kubectl client must occur at bundle execution. This is because it relies upon credentials to connect to the user's (not bundle author's) cluster to identity the targeted cluster version. Every time the bundle runs, it can be used against a different cluster with a different version of Kubernetes.
The mixin configuration allows the bundle author to specify the default kubectl client version that should be installed at buildtime. When it is not specified, it will fall back and install the version hard coded in the mixin. We can also improve the mixin to always install the latest version of kubectl which I think would be a welcome change.
This gives us a minimum of one and possibly two downloads. There is always a download that occurs at buildtime which guarantees that there will always be a kubectl client in the invocation image. This client may then be optionally used to detect the cluster version at runtime and then download a matching version dynamically.
For the other issue you referenced, getporter/porter#975, mixin installation always occurs at buildtime. Mixins are built into bundle during porter build
and never needed to be installed on the client in order to execute a bundle (runtime). If you'd like to chat about that issue further, let's do it on that issue so that we keep the discussion in one place.
from kubernetes-mixin.
Related Issues (15)
- Add build badge
- Put in place (azure devops) CI to run build/tests against PRs and publishing from main or tag HOT 1
- kuberentes mixin should be able to reference a URL HOT 1
- kubernetes mixin should have a namespace-create command, that's an upsert HOT 1
- kubernetes mixin should allow uninstall step to succeed when resources are not found
- Download the kubectl client binary dynamically at runtime HOT 1
- Make sure the main branch is stable/working as intended HOT 2
- Print manifest contents when --debug was passed
- Cut release from main when it is ready HOT 1
- Update example with how to set credentials for kubeconfig HOT 1
- Update any docs accordingly HOT 1
- Set up the feed and create a PR to update the porter main feed HOT 1
- Create a PR to add the Kubernetes mixin feed into porter-packages HOT 1
- Add associated docs (CONTRIBUTING, REVIEWING, CODE_OF_CONDUCT)
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 kubernetes-mixin.