-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add APIService fake clientset support #3569
Conversation
f620028
to
b1d464b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good, but I do have some meta-questions about the larger context.
Do we have concerns about this approach being sustainable? We will need to add a fake client set for any API group in our install manifest, even if we never plan to read that object from the real or fake API.
An alternate approach would be to have the upgrade --from-manifest
code parse the manifest directly rather than constructing a fake API. Has this already been considered?
Anyway, I'm sure this is fine. It just feels weird that we need to build fake client sets for apigroups that we never interact with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the deps change required?
I'm not particularly concerned about the sustainability. Thus far we have special-cased
When implementing #2697 I did consider this approach, but realizing we already had
I had two motivations for this branch: 1. Upgrading from a complete install manifestOur install/check/upgrade/cli ux is extremely clear and often called out as a favorite feature by users. Without this change, the upgrade from manifest flow requires the user to understand which k8s objects are required for upgrade: linkerd install > linkerd-install.yaml
cat linkerd-install.yaml | kubectl apply -f -
kubectl -n linkerd get \
secret/linkerd-identity-issuer \
configmap/linkerd-config \
-oyaml > linkerd-manifests.yaml
cat linkerd-manifests.yaml | linkerd upgrade --from-manifests - | kubectl apply -f - ... this change allows for a more user friendly upgrade process: linkerd install > linkerd-install.yaml
cat linkerd-install.yaml | kubectl apply -f -
cat linkerd-install.yaml | linkerd upgrade --from-manifests - | kubectl apply -f - 2. Testing completenessThe |
I tried minimizing the changes to |
@siggy Code change LGTM 👍! Mind fixing up the conflicts? |
b1d464b
to
c3a24d7
Compare
The `linkerd upgrade --from-manifests` command supports reading the manifest output via `linkerd install`. PR #3167 introduced a tap APIService object into `linkerd install`, but the manifest-reading code in fake.go was never updated to support this new object kind. Update the fake clientset code to support APIService objects. Fixes #3559 Signed-off-by: Andrew Seigner <[email protected]>
c3a24d7
to
f648a92
Compare
The
linkerd upgrade --from-manifests
command supports reading themanifest output via
linkerd install
. PR #3167 introduced a tapAPIService object into
linkerd install
, but the manifest-reading codein fake.go was never updated to support this new object kind.
Update the fake clientset code to support APIService objects.
Fixes #3559
Signed-off-by: Andrew Seigner [email protected]