-
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 the linkerd-version
CLI flag into control-plane-version
and proxy-version
#2702
Conversation
Integration test results for 7964a77: 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.
Changes look good and tested fine for me 👍
I was thinking it might be nice to change Global.version
to Global.proxy_version
, but it seems changes in the config are delicate as discussed in #2671, so that could be something for the future after multi-stage install (upgrade?) lands...
Integration test results for 453c546: success 🎉 |
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 good! a couple comments around deprecating --linkerd-version
.
also i think you'll need to update the travis script as well:
Line 115 in 80634d6
- target/cli/linux/linkerd install --linkerd-version=$LINKERD_TAG |tee linkerd.yml |
cli/cmd/root.go
Outdated
@@ -285,8 +290,10 @@ func (options *proxyConfigOptions) flagSet(e pflag.ErrorHandling) *pflag.FlagSet | |||
// Deprecated flags | |||
flags.StringVar(&options.proxyMemoryRequest, "proxy-memory", options.proxyMemoryRequest, "Amount of Memory that the proxy sidecar requests") | |||
flags.StringVar(&options.proxyCPURequest, "proxy-cpu", options.proxyCPURequest, "Amount of CPU units that the proxy sidecar requests") | |||
flags.StringVarP(&options.linkerdVersion, "linkerd-version", "", options.linkerdVersion, "Tag to be used for Linkerd images") |
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.
related to previous comment, remove?
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 think it's valuable to leave this, especially for development. but i don't think it should be visible by default
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 don't think it's used anymore?
$ bin/go-run cli install --linkerd-version edge-1.2.3 | grep edge-1.2.3
Flag --linkerd-version has been deprecated, use --proxy-version instead
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.
Ah, I think that's wrong then. We still need a way to override the linkerd version. If we want to call it control-plane-version
or something, that's fine with me.
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.
Yeah, I did rename it to control-plane-version
prior to submitting this PR, then back out of it, because of the changes I had to make to get it into the proxy-init image tag.
Before I go ahead and include this change, can we not just use something like kubectl edit
or kubectl set image
to change the control plane version, for development purposes?
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.
Actually, if we're gonna include the control plane version in the global config, then this won't be a problem. I can fix this in my next commit.
cli/cmd/install.go
Outdated
@@ -591,7 +592,7 @@ func (options *installOptions) globalConfig(identity *pb.IdentityContext) *pb.Gl | |||
LinkerdNamespace: controlPlaneNamespace, | |||
AutoInjectContext: autoInjectContext, | |||
CniEnabled: options.noInitContainer, | |||
Version: options.linkerdVersion, | |||
Version: options.proxyVersion, |
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 isn't correct. the global version should be the installed control plane version. It sounds like we may need the ProxyConfig to get a Version field...
cli/cmd/inject.go
Outdated
configs.Global.Version = options.linkerdVersion | ||
overrideAnnotations[k8s.ProxyVersionOverrideAnnotation] = options.linkerdVersion | ||
if options.proxyVersion != "" { | ||
configs.Global.Version = options.proxyVersion |
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.
again, I think this is conflating things...
Deprecate the linkerd-version flag. If provided, it has no effects on the YAML output. Signed-off-by: Ivan Sim <ivan@buoyant.io>
Signed-off-by: Ivan Sim <ivan@buoyant.io>
Signed-off-by: Ivan Sim <ivan@buoyant.io>
453c546
to
6d157c6
Compare
linkerd-version
CLI flag into control-plane-version
and proxy-version
6d157c6
to
501ef0a
Compare
Integration test results for 501ef0a: fail 😕 |
I split the
LMK if I missed anything. |
The 'linkerd-version' CLI flag is renamed to 'control-plane-version' Signed-off-by: Ivan Sim <ivan@buoyant.io>
501ef0a
to
fbf36db
Compare
Integration test results for fbf36db: success 🎉 |
Signed-off-by: Ivan Sim <ivan@buoyant.io>
Integration test results for d2d08e4: success 🎉 |
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 is looking good. most of my comments are around more explicit tests.
@@ -41,6 +41,8 @@ message Proxy { | |||
int64 proxy_uid = 10; | |||
LogLevel log_level = 11; | |||
bool disable_external_profiles = 12; | |||
|
|||
string proxy_version = 13; |
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.
maybe add a comment above Global.version
calling out that it's for control-plane version, and also used as proxy-init version during inject.
Signed-off-by: Ivan Sim <ivan@buoyant.io>
Signed-off-by: Ivan Sim <ivan@buoyant.io>
Signed-off-by: Ivan Sim <ivan@buoyant.io>
Signed-off-by: Ivan Sim <ivan@buoyant.io>
@@ -184,9 +188,9 @@ metadata: | |||
namespace: linkerd | |||
data: | |||
global: | | |||
{"linkerdNamespace":"linkerd","cniEnabled":false,"version":"dev-undefined","identityContext":{"trustDomain":"cluster.local","trustAnchorsPem":"-----BEGIN CERTIFICATE-----\nMIIBYDCCAQegAwIBAgIBATAKBggqhkjOPQQDAjAYMRYwFAYDVQQDEw1jbHVzdGVy\nLmxvY2FsMB4XDTE5MDMwMzAxNTk1MloXDTI5MDIyODAyMDM1MlowGDEWMBQGA1UE\nAxMNY2x1c3Rlci5sb2NhbDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABAChpAt0\nxtgO9qbVtEtDK80N6iCL2Htyf2kIv2m5QkJ1y0TFQi5hTVe3wtspJ8YpZF0pl364\n6TiYeXB8tOOhIACjQjBAMA4GA1UdDwEB/wQEAwIBBjAdBgNVHSUEFjAUBggrBgEF\nBQcDAQYIKwYBBQUHAwIwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAgNHADBE\nAiBQ/AAwF8kG8VOmRSUTPakSSa/N4mqK2HsZuhQXCmiZHwIgZEzI5DCkpU7w3SIv\nOLO4Zsk1XrGZHGsmyiEyvYF9lpY=\n-----END CERTIFICATE-----\n","issuanceLifetime":"86400s","clockSkewAllowance":"20s"},"autoInjectContext":null} | |||
{"linkerdNamespace":"linkerd","cniEnabled":false,"version":"install-control-plane-version","identityContext":{"trustDomain":"cluster.local","trustAnchorsPem":"-----BEGIN CERTIFICATE-----\nMIIBYDCCAQegAwIBAgIBATAKBggqhkjOPQQDAjAYMRYwFAYDVQQDEw1jbHVzdGVy\nLmxvY2FsMB4XDTE5MDMwMzAxNTk1MloXDTI5MDIyODAyMDM1MlowGDEWMBQGA1UE\nAxMNY2x1c3Rlci5sb2NhbDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABAChpAt0\nxtgO9qbVtEtDK80N6iCL2Htyf2kIv2m5QkJ1y0TFQi5hTVe3wtspJ8YpZF0pl364\n6TiYeXB8tOOhIACjQjBAMA4GA1UdDwEB/wQEAwIBBjAdBgNVHSUEFjAUBggrBgEF\nBQcDAQYIKwYBBQUHAwIwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAgNHADBE\nAiBQ/AAwF8kG8VOmRSUTPakSSa/N4mqK2HsZuhQXCmiZHwIgZEzI5DCkpU7w3SIv\nOLO4Zsk1XrGZHGsmyiEyvYF9lpY=\n-----END CERTIFICATE-----\n","issuanceLifetime":"86400s","clockSkewAllowance":"20s"},"autoInjectContext":null} |
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.
global.version
and proxy.proxyVersion
pick up the version test values used in testInstallOptions()
, instead of just dev-undefined
.
Integration test results for 8d6092a: success 🎉 |
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.
lgtm 👍 🚢
This PR replaces the CLI
linkerd-version
flag with a new flag namedproxy-version
. When provided during install, upgrade or inject, this flag sets the proxy image tag to the provided value. The originallinkerd-version
flag is marked deprecated. If provided, it has no effects on the YAML output.All the control plane components' and proxy init's image tags are now pinned to
version.Version
. My thought is to not provide any CLI flags to override them, because:kubectl set image
ResourceConfig
struct, none of which feel clean, just to support a dev-only flag.The CNI
linkerd-version
flag isn't changed; it refers to the CNI image tag.How I tested it:
Fixes #2614
Signed-off-by: Ivan Sim ivan@buoyant.io