-
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
Split proxy-init into separate repo #2824
Conversation
Integration test results for 4dc2000: fail 😕 |
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.
looks (and works) good.
fwiw, l5d-bot is failing because of an issue with l5d-bot, this branch is fine.
i think i have a slight preference for versioning the proxy-init
repo separately from the main linkerd2
repo. my primary concern is that it could cause confusion for users, when they install stable-2.4.0
, and they see a reference to stable-2.3.0
in their install output.
for our base Docker image, we use a date:
Line 1 in b965d0d
ARG RUNTIME_IMAGE=gcr.io/linkerd-io/base:2019-02-19.01 |
for linkerd2-proxy, we use a sha:
linkerd2/bin/docker-build-proxy
Lines 25 to 26 in b965d0d
# Default to a pinned commit SHA of the proxy. | |
PROXY_VERSION="${PROXY_VERSION:-5f89351}" |
...or, we could just do regular v0.0.x
versioning, which would better conform to Go Modules support ;)
... on a more meta point (and apologies for the lateness) i did not realize until just now that linkerd-cni
has a code-level Go dependency on proxy-init. this could make further development in that area more painful. stepping back a bit, what are we trying to achieve with this change? if it's a faster build, it may be worthwhile to explore other options. thoughts @alpeb @olix0r ?
I have a strong preference to keep them separate ;) Can we just call the proxy-init 1.0.0? |
reflecting on this a bit, given how infrequently the proxy-init code changes, this is probably not a big deal.
agree, let's tag things as |
Thanks for the feedback! |
Integration test results for 841f1e8: fail 😕 |
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.
i just realized l5d-bot is likely failing due to a few straggling references in /bin
:
$ grep -R proxy-init bin
bin/docker-images:for img in cli-bin cni-plugin controller debug grafana proxy proxy-init web ; do
bin/docker-pull:for img in cli-bin cni-plugin controller debug grafana proxy proxy-init web ; do
bin/docker-retag-all:for img in cli-bin cni-plugin controller debug grafana proxy proxy-init web ; do
bin/docker-push:for img in cli-bin cni-plugin controller debug grafana proxy proxy-init web ; do
there's also a Integration tests: proxy-init
section in TEST.md
that probably needs updating.
53036ad
to
05d6f6c
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.
good to go assuming all tests pass 👍 🚢
left one comment about a comment. also there's a few more references to proxy-init
in BUILD.md
that should be removed.
Integration test results for 05d6f6c: fail 😕 |
1c608e4
to
85d15a5
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.
left a comment around adding one more known k8s event to integration tests.
looks like some unit test files need updating too?
https://travis-ci.org/linkerd/linkerd2/jobs/533554338#L1160
Integration test results for 6df0df2: success 🎉 |
6df0df2
to
7843470
Compare
Integration test results for 7843470: success 🎉 |
af65676
to
8bbbeca
Compare
Integration test results for 8bbbeca: fail 😕 |
Fixes #2563 The new repo is https://github.com/linkerd/linkerd2-proxy-init, and I tagged the latest there `stable-2.3.0`. The plan would be to tag it each time it is updated, using the same tag of the linkerd2 repo that required that change. I think that helps keeping track of which proxy-init version is required by which linkerd2 version. Let me know if you have a different opinion! Here, I've removed the `/proxy-init` dir and pinned the injected proxy-init version to `stable-2.3.0` in the injector code and tests. `/cni-plugin` depends on proxy-init, so I updated the import paths there, and could verify CNI is still working (there is some flakiness but unrelated to this PR). For consistency, I added a `--init-image-version` flag to `linkerd inject` along with its corresponding override config annotation. If deemed too much, we can hide it (along with `--init-image`). Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
proxy-init in TEST.md into the proxy-init repo Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
…en there are no overrides Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
8bbbeca
to
bc603e1
Compare
Integration test results for bc603e1: success 🎉 |
Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
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.
👍 Thanks for addressing all the comments. Once the new annotation label is renamed to match the CLI option, feel free to merge this PR.
Here are the different install
, inject
and upgrade
test cases I used:
# expect pods creation to fail due to image tag error
bin/linkerd install --init-image-version=v2.0.0 |k apply -f -
# expect proxy.proxyInitImageVersion to be v2.0.0
k -n linkerd describe cm linkerd-config
# expect pods creation to succeed
bin/linkerd install --ignore-cluster |k apply -f -
# expect proxy.proxyInitImageVersion to be v1.0.0
k -n linkerd describe cm linkerd-config
# expect injected pod to use init image v1.0.0
curl https://run.linkerd.io/emojivoto.yml | bin/linkerd inject - | k apply -f -
# expect upgrade to succeed
bin/linkerd upgrade|k apply -f -
# expect proxy.proxyInitImageVersion to be v1.0.0
k -n linkerd describe cm linkerd-config
# expect pods creation to fail due to image tag error
bin/linkerd upgrade --init-image-version=v3.0.0|k apply -f -
# expect proxy.proxyInitImageVersion to be v3.0.0
k -n linkerd describe cm linkerd-config
# expect pods creation to fail because it's pulling v3.0.0 from linkerd-config
bin/linkerd upgrade|k apply -f -
# expect pods creation to succeed
bin/linkerd upgrade --init-image-version=v1.0.0|k apply -f -
# expect proxy.proxyInitImageVersion to be v1.0.0
k -n linkerd describe cm linkerd-config
# expect injected pod to use init image v1.0.0
curl https://run.linkerd.io/emojivoto.yml | bin/linkerd inject - | k apply -f -
# install edge-19.5.4, upgrade to HEAD
linkerd version
Client version: edge-19.5.4
Server version: unavailable
# expect pod creation to succeed
linkerd install|k apply -f -
# expect no proxy.proxyInitImageVersion key/value in CM
k -n linkerd describe cm linkerd-config
# expect pods creation to succeed
bin/linkerd upgrade|k apply -f -
# expect proxy.proxyInitImageVersion to be v1.0.0
k -n linkerd describe cm linkerd-config
# test with annotation and auto-inject
# annotations:
# config.linkerd.io/proxy-init-version: v3.0.0
# ....
# annotations:
# config.linkerd.io/proxy-init-version: v1.0.0
Integration test results for f1b164e: success 🎉 |
Fixes #2563
The new repo is https://github.com/linkerd/linkerd2-proxy-init, and I
tagged the latest there
stable-2.3.0
. The plan would be to tag it eachtime it is updated, using the same tag of the linkerd2 repo that
required that change. I think that helps keeping track of which
proxy-init version is required by which linkerd2 version. Let me know if
you have a different opinion!
Here, I've removed the
/proxy-init
dir and pinned the injectedproxy-init version to
stable-2.3.0
in the injector code and tests./cni-plugin
depends on proxy-init, so I updated the import pathsthere, and could verify CNI is still working (there is some flakiness
but unrelated to this PR).
For consistency, I added a
--init-image-version
flag tolinkerd inject
along with its corresponding override config annotation. Ifdeemed too much, we can hide it (along with
--init-image
).