config: Store install parameters with global config (#2577)

When installing Linkerd, a user may override default settings, or may
explicitly configure defaults. Consider install options like `--ha
--controller-replicas=4` -- the `--ha` flag sets a new default value for
the controller-replicas, and then we override it.

When we later upgrade this cluster, how can we know how to configure the
cluster?

We could store EnableHA and ControllerReplicas configurations in the
config, but what if, in a later upgrade, the default value changes? How
can we know whether the user specified an override or just used the
default?

To solve this, we add an `Install` message into a new config.
This message includes (at least) the CLI flags used to invoke
install.

upgrade does not specify defaults for install/proxy-options fields and,
instead, uses the persisted install flags to populate default values,
before applying overrides from the upgrade invocation.

This change breaks the protobuf compatibility by altering the
`installation_uuid` field introduced in 9c442f6885.
Because this change was not yet released (even in an edge release), we
feel that it is safe to break.

Fixes https://github.com/linkerd/linkerd2/issues/2574
This commit is contained in:
Oliver Gould 2019-03-29 10:04:20 -07:00 committed by GitHub
parent 45aa10dcc2
commit 655632191b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 439 additions and 195 deletions

View File

@ -11,7 +11,7 @@ RUN (proxy=$(bin/fetch-proxy $PROXY_VERSION) && \
echo "$version" >version.txt)
## compile proxy-identity agent
FROM gcr.io/linkerd-io/go-deps:cdba5b70 as golang
FROM gcr.io/linkerd-io/go-deps:f39dc9a4 as golang
WORKDIR /go/src/github.com/linkerd/linkerd2
ENV CGO_ENABLED=0 GOOS=linux
COPY pkg/flags pkg/flags

View File

@ -1283,6 +1283,7 @@
"github.com/sirupsen/logrus",
"github.com/spf13/cobra",
"github.com/spf13/cobra/doc",
"github.com/spf13/pflag",
"github.com/wercker/stern/stern",
"golang.org/x/net/context",
"google.golang.org/grpc",

View File

@ -10,12 +10,16 @@ metadata:
annotations:
{{.CreatedByAnnotation}}: {{.CliVersion}}
data:
{{- if .GlobalConfig}}
{{- with .Configs.Global}}
global: |
{{.GlobalConfig}}
{{.}}
{{- end}}
{{- if .ProxyConfig}}
{{- with .Configs.Proxy}}
proxy: |
{{.ProxyConfig}}
{{.}}
{{- end }}
{{- with .Configs.Install}}
install: |
{{.}}
{{- end }}
{{- end}}

View File

@ -1,5 +1,5 @@
## compile binaries
FROM gcr.io/linkerd-io/go-deps:cdba5b70 as golang
FROM gcr.io/linkerd-io/go-deps:f39dc9a4 as golang
WORKDIR /go/src/github.com/linkerd/linkerd2
COPY cli cli
COPY chart chart

View File

@ -17,6 +17,7 @@ import (
"github.com/linkerd/linkerd2/pkg/k8s"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"sigs.k8s.io/yaml"
)
@ -101,7 +102,7 @@ sub-folders, or coming from stdin.`,
},
}
addProxyConfigFlags(cmd, options.proxyConfigOptions)
cmd.PersistentFlags().AddFlagSet(options.proxyConfigOptions.flagSet(pflag.ExitOnError))
cmd.PersistentFlags().BoolVar(
&options.disableIdentity, "disable-identity", options.disableIdentity,
"Disables resources from participating in TLS identity",

View File

@ -10,17 +10,17 @@ import (
"path"
"time"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/ptypes"
"github.com/linkerd/linkerd2/cli/static"
"github.com/linkerd/linkerd2/controller/gen/config"
pb "github.com/linkerd/linkerd2/controller/gen/config"
"github.com/linkerd/linkerd2/pkg/config"
"github.com/linkerd/linkerd2/pkg/k8s"
"github.com/linkerd/linkerd2/pkg/tls"
"github.com/linkerd/linkerd2/pkg/version"
uuid "github.com/satori/go.uuid"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/validation"
@ -54,8 +54,8 @@ type (
ControllerUID int64
EnableH2Upgrade bool
NoInitContainer bool
GlobalConfig string
ProxyConfig string
Configs configJSONs
DestinationResources,
GrafanaResources,
@ -69,6 +69,8 @@ type (
Identity *installIdentityValues
}
configJSONs struct{ Global, Proxy, Install string }
resources struct{ CPU, Memory constraints }
constraints struct{ Request, Limit string }
@ -107,7 +109,10 @@ type (
identityOptions *installIdentityOptions
*proxyConfigOptions
overrideUUIDForTest string
recordedFlags []*pb.Install_Flag
// A function pointer that can be overridden for tests
generateUUID func() string
}
installIdentityOptions struct {
@ -179,6 +184,10 @@ func newInstallOptionsWithDefaults() *installOptions {
noInitContainer: false,
},
identityOptions: newInstallIdentityOptionsWithDefaults(),
generateUUID: func() string {
return uuid.NewV4().String()
},
}
}
@ -192,12 +201,15 @@ func newInstallIdentityOptionsWithDefaults() *installIdentityOptions {
func newCmdInstall() *cobra.Command {
options := newInstallOptionsWithDefaults()
flags := options.flagSet(pflag.ExitOnError)
cmd := &cobra.Command{
Use: "install [flags]",
Short: "Output Kubernetes configs to install Linkerd",
Long: "Output Kubernetes configs to install Linkerd.",
RunE: func(cmd *cobra.Command, args []string) error {
options.recordFlags(flags)
values, configs, err := options.validateAndBuild()
if err != nil {
return err
@ -206,60 +218,100 @@ func newCmdInstall() *cobra.Command {
},
}
return options.configure(cmd)
cmd.PersistentFlags().AddFlagSet(flags)
// Issuer flags are currently only supported on the initial install.
cmd.PersistentFlags().AddFlagSet(options.issuerFlagSet(pflag.ExitOnError))
return cmd
}
func (options *installOptions) configure(cmd *cobra.Command) *cobra.Command {
addProxyConfigFlags(cmd, options.proxyConfigOptions)
cmd.PersistentFlags().UintVar(
func (options *installOptions) flagSet(e pflag.ErrorHandling) *pflag.FlagSet {
flags := pflag.NewFlagSet("install", e)
flags.AddFlagSet(options.proxyConfigOptions.flagSet(e))
flags.UintVar(
&options.controllerReplicas, "controller-replicas", options.controllerReplicas,
"Replicas of the controller to deploy",
)
cmd.PersistentFlags().StringVar(
flags.StringVar(
&options.controllerLogLevel, "controller-log-level", options.controllerLogLevel,
"Log level for the controller and web components",
)
cmd.PersistentFlags().BoolVar(
flags.BoolVar(
&options.proxyAutoInject, "proxy-auto-inject", options.proxyAutoInject,
"Enable proxy sidecar auto-injection via a webhook (default false)",
)
cmd.PersistentFlags().BoolVar(
flags.BoolVar(
&options.highAvailability, "ha", options.highAvailability,
"Experimental: Enable HA deployment config for the control plane (default false)",
)
cmd.PersistentFlags().Int64Var(
flags.Int64Var(
&options.controllerUID, "controller-uid", options.controllerUID,
"Run the control plane components under this user ID",
)
cmd.PersistentFlags().BoolVar(
flags.BoolVar(
&options.disableH2Upgrade, "disable-h2-upgrade", options.disableH2Upgrade,
"Prevents the controller from instructing proxies to perform transparent HTTP/2 upgrading (default false)",
)
cmd.PersistentFlags().StringVar(
&options.identityOptions.trustDomain, "identity-trust-domain", options.identityOptions.trustDomain,
"Configures the name suffix used for identities.",
)
cmd.PersistentFlags().StringVar(
&options.identityOptions.trustPEMFile, "identity-trust-anchors-file", options.identityOptions.trustPEMFile,
"A path to a PEM-encoded file containing Linkerd Identity trust anchors (generated by default)",
)
cmd.PersistentFlags().StringVar(
&options.identityOptions.crtPEMFile, "identity-issuer-certificate-file", options.identityOptions.crtPEMFile,
"A path to a PEM-encoded file containing the Linkerd Identity issuer certificate (generated by default)",
)
cmd.PersistentFlags().StringVar(
&options.identityOptions.keyPEMFile, "identity-issuer-key-file", options.identityOptions.keyPEMFile,
"A path to a PEM-encoded file containing the Linkerd Identity issuer private key (generated by default)",
)
cmd.PersistentFlags().DurationVar(
&options.identityOptions.clockSkewAllowance, "identity-clock-skew-allowance", options.identityOptions.clockSkewAllowance,
"The amount of time to allow for clock skew within a Linkerd cluster",
)
cmd.PersistentFlags().DurationVar(
flags.DurationVar(
&options.identityOptions.issuanceLifetime, "identity-issuance-lifetime", options.identityOptions.issuanceLifetime,
"The amount of time for which the Identity issuer should certify identity",
)
return cmd
return flags
}
func (options *installOptions) issuerFlagSet(e pflag.ErrorHandling) *pflag.FlagSet {
flags := pflag.NewFlagSet("issuer", e)
flags.StringVar(
&options.identityOptions.trustDomain, "identity-trust-domain", options.identityOptions.trustDomain,
"Configures the name suffix used for identities.",
)
flags.StringVar(
&options.identityOptions.trustPEMFile, "identity-trust-anchors-file", options.identityOptions.trustPEMFile,
"A path to a PEM-encoded file containing Linkerd Identity trust anchors (generated by default)",
)
flags.StringVar(
&options.identityOptions.crtPEMFile, "identity-issuer-certificate-file", options.identityOptions.crtPEMFile,
"A path to a PEM-encoded file containing the Linkerd Identity issuer certificate (generated by default)",
)
flags.StringVar(
&options.identityOptions.keyPEMFile, "identity-issuer-key-file", options.identityOptions.keyPEMFile,
"A path to a PEM-encoded file containing the Linkerd Identity issuer private key (generated by default)",
)
flags.DurationVar(
&options.identityOptions.clockSkewAllowance, "identity-clock-skew-allowance", options.identityOptions.clockSkewAllowance,
"The amount of time to allow for clock skew within a Linkerd cluster",
)
flags.DurationVar(
&options.identityOptions.issuanceLifetime, "identity-issuance-lifetime", options.identityOptions.issuanceLifetime,
"The amount of time for which the Identity issuer should certify identity",
)
return flags
}
func (options *installOptions) recordFlags(flags *pflag.FlagSet) {
if flags == nil {
return
}
flags.VisitAll(func(f *pflag.Flag) {
if f.Changed {
switch f.Name {
case "ignore-cluster", "linkerd-version":
// These flags don't make sense to record.
default:
options.recordedFlags = append(options.recordedFlags, &pb.Install_Flag{
Name: f.Name,
Value: f.Value.String(),
})
}
}
})
}
func (options *installOptions) validate() error {
@ -321,12 +373,7 @@ func (options *installOptions) validateAndBuild() (*installValues, *pb.All, erro
configs := options.configs(identityValues.toIdentityContext())
j := jsonpb.Marshaler{EmitDefaults: true}
globalConfig, err := j.MarshalToString(configs.GetGlobal())
if err != nil {
return nil, nil, err
}
proxyConfig, err := j.MarshalToString(configs.GetProxy())
globalJSON, proxyJSON, installJSON, err := config.ToJSON(configs)
if err != nil {
return nil, nil, err
}
@ -349,7 +396,7 @@ func (options *installOptions) validateAndBuild() (*installValues, *pb.All, erro
// Controller configuration:
Namespace: controlPlaneNamespace,
UUID: configs.GetGlobal().GetInstallationUuid(),
UUID: configs.GetInstall().GetUuid(),
ControllerReplicas: options.controllerReplicas,
ControllerLogLevel: options.controllerLogLevel,
ControllerUID: options.controllerUID,
@ -358,9 +405,13 @@ func (options *installOptions) validateAndBuild() (*installValues, *pb.All, erro
ProxyAutoInjectEnabled: options.proxyAutoInject,
PrometheusLogLevel: toPromLogLevel(options.controllerLogLevel),
GlobalConfig: globalConfig,
ProxyConfig: proxyConfig,
Identity: identityValues,
Configs: configJSONs{
Global: globalJSON,
Proxy: proxyJSON,
Install: installJSON,
},
Identity: identityValues,
}
if options.highAvailability {
@ -464,7 +515,7 @@ func (values *installValues) render(w io.Writer, configs *pb.All) error {
// Skip outbound port 443 to enable Kubernetes API access without the proxy.
// Once Kubernetes supports sidecar containers, this may be removed, as that
// will guarantee the proxy is running prior to control-plane startup.
configs.Proxy.IgnoreOutboundPorts = append(configs.Proxy.IgnoreOutboundPorts, &config.Port{Port: 443})
configs.Proxy.IgnoreOutboundPorts = append(configs.Proxy.IgnoreOutboundPorts, &pb.Port{Port: 443})
return processYAML(&buf, w, ioutil.Discard, resourceTransformerInject{
configs: configs,
@ -489,17 +540,13 @@ func readIntoBytes(filename string) ([]byte, error) {
func (options *installOptions) configs(identity *pb.IdentityContext) *pb.All {
return &pb.All{
Global: options.globalConfig(identity),
Proxy: options.proxyConfig(),
Global: options.globalConfig(identity),
Proxy: options.proxyConfig(),
Install: options.installConfig(),
}
}
func (options *installOptions) globalConfig(identity *pb.IdentityContext) *pb.Global {
id := uuid.NewV4().String()
if options.overrideUUIDForTest != "" {
id = options.overrideUUIDForTest
}
var autoInjectContext *pb.AutoInjectContext
if options.proxyAutoInject {
autoInjectContext = &pb.AutoInjectContext{}
@ -511,7 +558,19 @@ func (options *installOptions) globalConfig(identity *pb.IdentityContext) *pb.Gl
CniEnabled: options.noInitContainer,
Version: options.linkerdVersion,
IdentityContext: identity,
InstallationUuid: id,
}
}
func (options *installOptions) installConfig() *pb.Install {
installID := ""
if options.generateUUID != nil {
installID = options.generateUUID()
}
return &pb.Install{
Uuid: installID,
CliVersion: version.Version,
Flags: options.recordedFlags,
}
}
@ -543,7 +602,7 @@ func (options *installOptions) proxyConfig() *pb.Proxy {
InboundPort: &pb.Port{
Port: uint32(options.proxyInboundPort),
},
AdminPort: &config.Port{
AdminPort: &pb.Port{
Port: uint32(options.proxyAdminPort),
},
OutboundPort: &pb.Port{

View File

@ -41,17 +41,27 @@ func TestRender(t *testing.T) {
ControllerUID: 2103,
EnableH2Upgrade: true,
NoInitContainer: false,
GlobalConfig: "GlobalConfig",
ProxyConfig: "ProxyConfig",
ControllerReplicas: 1,
Identity: defaultValues.Identity,
Configs: configJSONs{
Global: "GlobalConfig",
Proxy: "ProxyConfig",
Install: "InstallConfig",
},
ControllerReplicas: 1,
Identity: defaultValues.Identity,
}
haOptions := testInstallOptions()
haOptions.recordedFlags = []*config.Install_Flag{{Name: "ha", Value: "true"}}
haOptions.highAvailability = true
haValues, haConfig, _ := haOptions.validateAndBuild()
haWithOverridesOptions := testInstallOptions()
haWithOverridesOptions.recordedFlags = []*config.Install_Flag{
{Name: "ha", Value: "true"},
{Name: "controller-replicas", Value: "2"},
{Name: "proxy-cpu-request", Value: "400m"},
{Name: "proxy-memory-request", Value: "300Mi"},
}
haWithOverridesOptions.highAvailability = true
haWithOverridesOptions.controllerReplicas = 2
haWithOverridesOptions.proxyCPURequest = "400m"
@ -59,10 +69,15 @@ func TestRender(t *testing.T) {
haWithOverridesValues, haWithOverridesConfig, _ := haWithOverridesOptions.validateAndBuild()
noInitContainerOptions := testInstallOptions()
noInitContainerOptions.recordedFlags = []*config.Install_Flag{{Name: "linkerd-cni-enabled", Value: "true"}}
noInitContainerOptions.noInitContainer = true
noInitContainerValues, noInitContainerConfig, _ := noInitContainerOptions.validateAndBuild()
noInitContainerWithProxyAutoInjectOptions := testInstallOptions()
noInitContainerWithProxyAutoInjectOptions.recordedFlags = []*config.Install_Flag{
{Name: "linkerd-cni-enabled", Value: "true"},
{Name: "proxy-auto-inject", Value: "true"},
}
noInitContainerWithProxyAutoInjectOptions.noInitContainer = true
noInitContainerWithProxyAutoInjectOptions.proxyAutoInject = true
noInitContainerWithProxyAutoInjectValues, noInitContainerWithProxyAutoInjectConfig, _ := noInitContainerWithProxyAutoInjectOptions.validateAndBuild()
@ -97,7 +112,9 @@ func TestRender(t *testing.T) {
func testInstallOptions() *installOptions {
o := newInstallOptionsWithDefaults()
o.ignoreCluster = true
o.overrideUUIDForTest = "deaab91a-f4ab-448a-b7d1-c832a2fa0a60"
o.generateUUID = func() string {
return "deaab91a-f4ab-448a-b7d1-c832a2fa0a60"
}
o.identityOptions.crtPEMFile = filepath.Join("testdata", "crt.pem")
o.identityOptions.keyPEMFile = filepath.Join("testdata", "key.pem")
o.identityOptions.trustPEMFile = filepath.Join("testdata", "trust-anchors.pem")

View File

@ -8,6 +8,8 @@ import (
"strings"
"time"
"github.com/spf13/pflag"
"github.com/fatih/color"
pb "github.com/linkerd/linkerd2/controller/gen/public"
log "github.com/sirupsen/logrus"
@ -270,42 +272,38 @@ func registryOverride(image, registry string) string {
return strings.Replace(image, defaultDockerRegistry, registry, 1)
}
// addProxyConfigFlags adds command line flags for all fields in the
// proxyConfigOptions struct. To keep things organized, the flags should be
// added in the order that they're defined in the proxyConfigOptions struct.
func addProxyConfigFlags(cmd *cobra.Command, options *proxyConfigOptions) {
cmd.PersistentFlags().StringVarP(&options.linkerdVersion, "linkerd-version", "v", options.linkerdVersion, "Tag to be used for Linkerd images")
cmd.PersistentFlags().StringVar(&options.proxyImage, "proxy-image", options.proxyImage, "Linkerd proxy container image name")
cmd.PersistentFlags().StringVar(&options.initImage, "init-image", options.initImage, "Linkerd init container image name")
cmd.PersistentFlags().StringVar(&options.dockerRegistry, "registry", options.dockerRegistry, "Docker registry to pull images from")
cmd.PersistentFlags().StringVar(&options.imagePullPolicy, "image-pull-policy", options.imagePullPolicy, "Docker image pull policy")
cmd.PersistentFlags().UintVar(&options.proxyInboundPort, "inbound-port", options.proxyInboundPort, "Proxy port to use for inbound traffic")
cmd.PersistentFlags().UintVar(&options.proxyOutboundPort, "outbound-port", options.proxyOutboundPort, "Proxy port to use for outbound traffic")
cmd.PersistentFlags().UintSliceVar(&options.ignoreInboundPorts, "skip-inbound-ports", options.ignoreInboundPorts, "Ports that should skip the proxy and send directly to the application")
cmd.PersistentFlags().UintSliceVar(&options.ignoreOutboundPorts, "skip-outbound-ports", options.ignoreOutboundPorts, "Outbound ports that should skip the proxy")
cmd.PersistentFlags().Int64Var(&options.proxyUID, "proxy-uid", options.proxyUID, "Run the proxy under this user ID")
cmd.PersistentFlags().StringVar(&options.proxyLogLevel, "proxy-log-level", options.proxyLogLevel, "Log level for the proxy")
cmd.PersistentFlags().UintVar(&options.proxyControlPort, "control-port", options.proxyControlPort, "Proxy port to use for control")
cmd.PersistentFlags().UintVar(&options.proxyAdminPort, "admin-port", options.proxyAdminPort, "Proxy port to serve metrics on")
cmd.PersistentFlags().StringVar(&options.proxyCPURequest, "proxy-cpu-request", options.proxyCPURequest, "Amount of CPU units that the proxy sidecar requests")
cmd.PersistentFlags().StringVar(&options.proxyMemoryRequest, "proxy-memory-request", options.proxyMemoryRequest, "Amount of Memory that the proxy sidecar requests")
cmd.PersistentFlags().StringVar(&options.proxyCPULimit, "proxy-cpu-limit", options.proxyCPULimit, "Maximum amount of CPU units that the proxy sidecar can use")
cmd.PersistentFlags().StringVar(&options.proxyMemoryLimit, "proxy-memory-limit", options.proxyMemoryLimit, "Maximum amount of Memory that the proxy sidecar can use")
cmd.PersistentFlags().BoolVar(&options.disableExternalProfiles, "disable-external-profiles", options.disableExternalProfiles, "Disables service profiles for non-Kubernetes services")
cmd.PersistentFlags().BoolVar(&options.noInitContainer, "linkerd-cni-enabled", options.noInitContainer, "Experimental: Omit the proxy-init container when injecting the proxy; requires the linkerd-cni plugin to already be installed")
func (options *proxyConfigOptions) flagSet(e pflag.ErrorHandling) *pflag.FlagSet {
flags := pflag.NewFlagSet("proxy", e)
flags.StringVarP(&options.linkerdVersion, "linkerd-version", "v", options.linkerdVersion, "Tag to be used for Linkerd images")
flags.StringVar(&options.proxyImage, "proxy-image", options.proxyImage, "Linkerd proxy container image name")
flags.StringVar(&options.initImage, "init-image", options.initImage, "Linkerd init container image name")
flags.StringVar(&options.dockerRegistry, "registry", options.dockerRegistry, "Docker registry to pull images from")
flags.StringVar(&options.imagePullPolicy, "image-pull-policy", options.imagePullPolicy, "Docker image pull policy")
flags.UintVar(&options.proxyInboundPort, "inbound-port", options.proxyInboundPort, "Proxy port to use for inbound traffic")
flags.UintVar(&options.proxyOutboundPort, "outbound-port", options.proxyOutboundPort, "Proxy port to use for outbound traffic")
flags.UintSliceVar(&options.ignoreInboundPorts, "skip-inbound-ports", options.ignoreInboundPorts, "Ports that should skip the proxy and send directly to the application")
flags.UintSliceVar(&options.ignoreOutboundPorts, "skip-outbound-ports", options.ignoreOutboundPorts, "Outbound ports that should skip the proxy")
flags.Int64Var(&options.proxyUID, "proxy-uid", options.proxyUID, "Run the proxy under this user ID")
flags.StringVar(&options.proxyLogLevel, "proxy-log-level", options.proxyLogLevel, "Log level for the proxy")
flags.UintVar(&options.proxyControlPort, "control-port", options.proxyControlPort, "Proxy port to use for control")
flags.UintVar(&options.proxyAdminPort, "admin-port", options.proxyAdminPort, "Proxy port to serve metrics on")
flags.StringVar(&options.proxyCPURequest, "proxy-cpu-request", options.proxyCPURequest, "Amount of CPU units that the proxy sidecar requests")
flags.StringVar(&options.proxyMemoryRequest, "proxy-memory-request", options.proxyMemoryRequest, "Amount of Memory that the proxy sidecar requests")
flags.StringVar(&options.proxyCPULimit, "proxy-cpu-limit", options.proxyCPULimit, "Maximum amount of CPU units that the proxy sidecar can use")
flags.StringVar(&options.proxyMemoryLimit, "proxy-memory-limit", options.proxyMemoryLimit, "Maximum amount of Memory that the proxy sidecar can use")
flags.BoolVar(&options.disableExternalProfiles, "disable-external-profiles", options.disableExternalProfiles, "Disables service profiles for non-Kubernetes services")
flags.BoolVar(&options.noInitContainer, "linkerd-cni-enabled", options.noInitContainer, "Experimental: Omit the proxy-init container when injecting the proxy; requires the linkerd-cni plugin to already be installed")
// Deprecated flags
cmd.PersistentFlags().StringVar(&options.proxyMemoryRequest, "proxy-memory", options.proxyMemoryRequest, "Amount of Memory that the proxy sidecar requests")
cmd.PersistentFlags().StringVar(&options.proxyCPURequest, "proxy-cpu", options.proxyCPURequest, "Amount of CPU units that the proxy sidecar requests")
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.MarkDeprecated("proxy-memory", "use --proxy-memory-request instead")
flags.MarkDeprecated("proxy-cpu", "use --proxy-cpu-request instead")
cmd.PersistentFlags().MarkHidden("proxy-memory")
cmd.PersistentFlags().MarkHidden("proxy-cpu")
cmd.PersistentFlags().MarkDeprecated("proxy-memory", "use --proxy-memory-request instead")
cmd.PersistentFlags().MarkDeprecated("proxy-cpu", "use --proxy-cpu-request instead")
cmd.PersistentFlags().BoolVar(
flags.BoolVar(
&options.ignoreCluster, "ignore-cluster", options.ignoreCluster,
"Ignore the current Kubernetes cluster when checking for existing cluster configuration (default false)",
)
return flags
}

View File

@ -15,9 +15,11 @@ metadata:
linkerd.io/created-by: linkerd/cli dev-undefined
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,"installationUuid":"deaab91a-f4ab-448a-b7d1-c832a2fa0a60"}
{"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}
proxy: |
{"proxyImage":{"imageName":"gcr.io/linkerd-io/proxy","pullPolicy":"IfNotPresent"},"proxyInitImage":{"imageName":"gcr.io/linkerd-io/proxy-init","pullPolicy":"IfNotPresent"},"controlPort":{"port":4190},"ignoreInboundPorts":[],"ignoreOutboundPorts":[],"inboundPort":{"port":4143},"adminPort":{"port":4191},"outboundPort":{"port":4140},"resource":{"requestCpu":"","requestMemory":"","limitCpu":"","limitMemory":""},"proxyUid":"2102","logLevel":{"level":"warn,linkerd2_proxy=info"},"disableExternalProfiles":false}
install: |
{"uuid":"deaab91a-f4ab-448a-b7d1-c832a2fa0a60","cliVersion":"dev-undefined","flags":[]}
---
###
### Identity Controller Service

View File

@ -15,9 +15,11 @@ metadata:
linkerd.io/created-by: linkerd/cli dev-undefined
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,"installationUuid":"deaab91a-f4ab-448a-b7d1-c832a2fa0a60"}
{"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}
proxy: |
{"proxyImage":{"imageName":"gcr.io/linkerd-io/proxy","pullPolicy":"IfNotPresent"},"proxyInitImage":{"imageName":"gcr.io/linkerd-io/proxy-init","pullPolicy":"IfNotPresent"},"controlPort":{"port":4190},"ignoreInboundPorts":[],"ignoreOutboundPorts":[],"inboundPort":{"port":4143},"adminPort":{"port":4191},"outboundPort":{"port":4140},"resource":{"requestCpu":"10m","requestMemory":"20Mi","limitCpu":"","limitMemory":""},"proxyUid":"2102","logLevel":{"level":"warn,linkerd2_proxy=info"},"disableExternalProfiles":false}
install: |
{"uuid":"deaab91a-f4ab-448a-b7d1-c832a2fa0a60","cliVersion":"dev-undefined","flags":[{"name":"ha","value":"true"}]}
---
###
### Identity Controller Service

View File

@ -15,9 +15,11 @@ metadata:
linkerd.io/created-by: linkerd/cli dev-undefined
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,"installationUuid":"deaab91a-f4ab-448a-b7d1-c832a2fa0a60"}
{"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}
proxy: |
{"proxyImage":{"imageName":"gcr.io/linkerd-io/proxy","pullPolicy":"IfNotPresent"},"proxyInitImage":{"imageName":"gcr.io/linkerd-io/proxy-init","pullPolicy":"IfNotPresent"},"controlPort":{"port":4190},"ignoreInboundPorts":[],"ignoreOutboundPorts":[],"inboundPort":{"port":4143},"adminPort":{"port":4191},"outboundPort":{"port":4140},"resource":{"requestCpu":"400m","requestMemory":"300Mi","limitCpu":"","limitMemory":""},"proxyUid":"2102","logLevel":{"level":"warn,linkerd2_proxy=info"},"disableExternalProfiles":false}
install: |
{"uuid":"deaab91a-f4ab-448a-b7d1-c832a2fa0a60","cliVersion":"dev-undefined","flags":[{"name":"ha","value":"true"},{"name":"controller-replicas","value":"2"},{"name":"proxy-cpu-request","value":"400m"},{"name":"proxy-memory-request","value":"300Mi"}]}
---
###
### Identity Controller Service

View File

@ -15,9 +15,11 @@ metadata:
linkerd.io/created-by: linkerd/cli dev-undefined
data:
global: |
{"linkerdNamespace":"linkerd","cniEnabled":true,"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,"installationUuid":"deaab91a-f4ab-448a-b7d1-c832a2fa0a60"}
{"linkerdNamespace":"linkerd","cniEnabled":true,"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}
proxy: |
{"proxyImage":{"imageName":"gcr.io/linkerd-io/proxy","pullPolicy":"IfNotPresent"},"proxyInitImage":{"imageName":"gcr.io/linkerd-io/proxy-init","pullPolicy":"IfNotPresent"},"controlPort":{"port":4190},"ignoreInboundPorts":[],"ignoreOutboundPorts":[],"inboundPort":{"port":4143},"adminPort":{"port":4191},"outboundPort":{"port":4140},"resource":{"requestCpu":"","requestMemory":"","limitCpu":"","limitMemory":""},"proxyUid":"2102","logLevel":{"level":"warn,linkerd2_proxy=info"},"disableExternalProfiles":false}
install: |
{"uuid":"deaab91a-f4ab-448a-b7d1-c832a2fa0a60","cliVersion":"dev-undefined","flags":[{"name":"linkerd-cni-enabled","value":"true"}]}
---
###
### Identity Controller Service

View File

@ -17,9 +17,11 @@ metadata:
linkerd.io/created-by: linkerd/cli dev-undefined
data:
global: |
{"linkerdNamespace":"linkerd","cniEnabled":true,"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":{},"installationUuid":"deaab91a-f4ab-448a-b7d1-c832a2fa0a60"}
{"linkerdNamespace":"linkerd","cniEnabled":true,"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":{}}
proxy: |
{"proxyImage":{"imageName":"gcr.io/linkerd-io/proxy","pullPolicy":"IfNotPresent"},"proxyInitImage":{"imageName":"gcr.io/linkerd-io/proxy-init","pullPolicy":"IfNotPresent"},"controlPort":{"port":4190},"ignoreInboundPorts":[],"ignoreOutboundPorts":[],"inboundPort":{"port":4143},"adminPort":{"port":4191},"outboundPort":{"port":4140},"resource":{"requestCpu":"","requestMemory":"","limitCpu":"","limitMemory":""},"proxyUid":"2102","logLevel":{"level":"warn,linkerd2_proxy=info"},"disableExternalProfiles":false}
install: |
{"uuid":"deaab91a-f4ab-448a-b7d1-c832a2fa0a60","cliVersion":"dev-undefined","flags":[{"name":"linkerd-cni-enabled","value":"true"},{"name":"proxy-auto-inject","value":"true"}]}
---
###
### Identity Controller Service

View File

@ -20,6 +20,8 @@ data:
GlobalConfig
proxy: |
ProxyConfig
install: |
InstallConfig
---
###
### Identity Controller Service

View File

@ -1,5 +1,5 @@
## compile cni-plugin utility
FROM gcr.io/linkerd-io/go-deps:cdba5b70 as golang
FROM gcr.io/linkerd-io/go-deps:f39dc9a4 as golang
WORKDIR /go/src/github.com/linkerd/linkerd2
COPY proxy-init proxy-init
COPY pkg pkg

View File

@ -1,5 +1,5 @@
## compile controller services
FROM gcr.io/linkerd-io/go-deps:cdba5b70 as golang
FROM gcr.io/linkerd-io/go-deps:f39dc9a4 as golang
WORKDIR /go/src/github.com/linkerd/linkerd2
COPY controller/gen controller/gen
COPY pkg pkg

View File

@ -22,6 +22,7 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type All struct {
Global *Global `protobuf:"bytes,1,opt,name=global,proto3" json:"global,omitempty"`
Proxy *Proxy `protobuf:"bytes,2,opt,name=proxy,proto3" json:"proxy,omitempty"`
Install *Install `protobuf:"bytes,3,opt,name=install,proto3" json:"install,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -31,7 +32,7 @@ func (m *All) Reset() { *m = All{} }
func (m *All) String() string { return proto.CompactTextString(m) }
func (*All) ProtoMessage() {}
func (*All) Descriptor() ([]byte, []int) {
return fileDescriptor_config_fd709b401e3b0efb, []int{0}
return fileDescriptor_config_0f2e36314897e9fa, []int{0}
}
func (m *All) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_All.Unmarshal(m, b)
@ -65,6 +66,13 @@ func (m *All) GetProxy() *Proxy {
return nil
}
func (m *All) GetInstall() *Install {
if m != nil {
return m.Install
}
return nil
}
type Global struct {
LinkerdNamespace string `protobuf:"bytes,1,opt,name=linkerd_namespace,json=linkerdNamespace,proto3" json:"linkerd_namespace,omitempty"`
CniEnabled bool `protobuf:"varint,2,opt,name=cni_enabled,json=cniEnabled,proto3" json:"cni_enabled,omitempty"`
@ -74,7 +82,6 @@ type Global struct {
// If present, indicates that the Mutating Webhook Admission Controller should
// be configured to automatically inject proxies.
AutoInjectContext *AutoInjectContext `protobuf:"bytes,6,opt,name=auto_inject_context,json=autoInjectContext,proto3" json:"auto_inject_context,omitempty"`
InstallationUuid string `protobuf:"bytes,5,opt,name=installation_uuid,json=installationUuid,proto3" json:"installation_uuid,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -84,7 +91,7 @@ func (m *Global) Reset() { *m = Global{} }
func (m *Global) String() string { return proto.CompactTextString(m) }
func (*Global) ProtoMessage() {}
func (*Global) Descriptor() ([]byte, []int) {
return fileDescriptor_config_fd709b401e3b0efb, []int{1}
return fileDescriptor_config_0f2e36314897e9fa, []int{1}
}
func (m *Global) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Global.Unmarshal(m, b)
@ -139,13 +146,6 @@ func (m *Global) GetAutoInjectContext() *AutoInjectContext {
return nil
}
func (m *Global) GetInstallationUuid() string {
if m != nil {
return m.InstallationUuid
}
return ""
}
type Proxy struct {
ProxyImage *Image `protobuf:"bytes,1,opt,name=proxy_image,json=proxyImage,proto3" json:"proxy_image,omitempty"`
ProxyInitImage *Image `protobuf:"bytes,2,opt,name=proxy_init_image,json=proxyInitImage,proto3" json:"proxy_init_image,omitempty"`
@ -168,7 +168,7 @@ func (m *Proxy) Reset() { *m = Proxy{} }
func (m *Proxy) String() string { return proto.CompactTextString(m) }
func (*Proxy) ProtoMessage() {}
func (*Proxy) Descriptor() ([]byte, []int) {
return fileDescriptor_config_fd709b401e3b0efb, []int{2}
return fileDescriptor_config_0f2e36314897e9fa, []int{2}
}
func (m *Proxy) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Proxy.Unmarshal(m, b)
@ -284,7 +284,7 @@ func (m *Image) Reset() { *m = Image{} }
func (m *Image) String() string { return proto.CompactTextString(m) }
func (*Image) ProtoMessage() {}
func (*Image) Descriptor() ([]byte, []int) {
return fileDescriptor_config_fd709b401e3b0efb, []int{3}
return fileDescriptor_config_0f2e36314897e9fa, []int{3}
}
func (m *Image) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Image.Unmarshal(m, b)
@ -329,7 +329,7 @@ func (m *Port) Reset() { *m = Port{} }
func (m *Port) String() string { return proto.CompactTextString(m) }
func (*Port) ProtoMessage() {}
func (*Port) Descriptor() ([]byte, []int) {
return fileDescriptor_config_fd709b401e3b0efb, []int{4}
return fileDescriptor_config_0f2e36314897e9fa, []int{4}
}
func (m *Port) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Port.Unmarshal(m, b)
@ -370,7 +370,7 @@ func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} }
func (m *ResourceRequirements) String() string { return proto.CompactTextString(m) }
func (*ResourceRequirements) ProtoMessage() {}
func (*ResourceRequirements) Descriptor() ([]byte, []int) {
return fileDescriptor_config_fd709b401e3b0efb, []int{5}
return fileDescriptor_config_0f2e36314897e9fa, []int{5}
}
func (m *ResourceRequirements) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResourceRequirements.Unmarshal(m, b)
@ -429,7 +429,7 @@ func (m *AutoInjectContext) Reset() { *m = AutoInjectContext{} }
func (m *AutoInjectContext) String() string { return proto.CompactTextString(m) }
func (*AutoInjectContext) ProtoMessage() {}
func (*AutoInjectContext) Descriptor() ([]byte, []int) {
return fileDescriptor_config_fd709b401e3b0efb, []int{6}
return fileDescriptor_config_0f2e36314897e9fa, []int{6}
}
func (m *AutoInjectContext) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AutoInjectContext.Unmarshal(m, b)
@ -463,7 +463,7 @@ func (m *IdentityContext) Reset() { *m = IdentityContext{} }
func (m *IdentityContext) String() string { return proto.CompactTextString(m) }
func (*IdentityContext) ProtoMessage() {}
func (*IdentityContext) Descriptor() ([]byte, []int) {
return fileDescriptor_config_fd709b401e3b0efb, []int{7}
return fileDescriptor_config_0f2e36314897e9fa, []int{7}
}
func (m *IdentityContext) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IdentityContext.Unmarshal(m, b)
@ -522,7 +522,7 @@ func (m *LogLevel) Reset() { *m = LogLevel{} }
func (m *LogLevel) String() string { return proto.CompactTextString(m) }
func (*LogLevel) ProtoMessage() {}
func (*LogLevel) Descriptor() ([]byte, []int) {
return fileDescriptor_config_fd709b401e3b0efb, []int{8}
return fileDescriptor_config_0f2e36314897e9fa, []int{8}
}
func (m *LogLevel) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LogLevel.Unmarshal(m, b)
@ -549,6 +549,113 @@ func (m *LogLevel) GetLevel() string {
return ""
}
// Stores information about the last installation/upgrade.
//
// Useful for driving upgrades.
type Install struct {
// The unique ID fr this installation. Does not change on upgrade.
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
// The CLI version that drove the last install or upgrade.
CliVersion string `protobuf:"bytes,2,opt,name=cli_version,json=cliVersion,proto3" json:"cli_version,omitempty"`
// The CLI arguments to the install (or upgrade) command, indicating the
// installer's intent.
Flags []*Install_Flag `protobuf:"bytes,3,rep,name=flags,proto3" json:"flags,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Install) Reset() { *m = Install{} }
func (m *Install) String() string { return proto.CompactTextString(m) }
func (*Install) ProtoMessage() {}
func (*Install) Descriptor() ([]byte, []int) {
return fileDescriptor_config_0f2e36314897e9fa, []int{9}
}
func (m *Install) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Install.Unmarshal(m, b)
}
func (m *Install) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Install.Marshal(b, m, deterministic)
}
func (dst *Install) XXX_Merge(src proto.Message) {
xxx_messageInfo_Install.Merge(dst, src)
}
func (m *Install) XXX_Size() int {
return xxx_messageInfo_Install.Size(m)
}
func (m *Install) XXX_DiscardUnknown() {
xxx_messageInfo_Install.DiscardUnknown(m)
}
var xxx_messageInfo_Install proto.InternalMessageInfo
func (m *Install) GetUuid() string {
if m != nil {
return m.Uuid
}
return ""
}
func (m *Install) GetCliVersion() string {
if m != nil {
return m.CliVersion
}
return ""
}
func (m *Install) GetFlags() []*Install_Flag {
if m != nil {
return m.Flags
}
return nil
}
type Install_Flag struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Install_Flag) Reset() { *m = Install_Flag{} }
func (m *Install_Flag) String() string { return proto.CompactTextString(m) }
func (*Install_Flag) ProtoMessage() {}
func (*Install_Flag) Descriptor() ([]byte, []int) {
return fileDescriptor_config_0f2e36314897e9fa, []int{9, 0}
}
func (m *Install_Flag) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Install_Flag.Unmarshal(m, b)
}
func (m *Install_Flag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Install_Flag.Marshal(b, m, deterministic)
}
func (dst *Install_Flag) XXX_Merge(src proto.Message) {
xxx_messageInfo_Install_Flag.Merge(dst, src)
}
func (m *Install_Flag) XXX_Size() int {
return xxx_messageInfo_Install_Flag.Size(m)
}
func (m *Install_Flag) XXX_DiscardUnknown() {
xxx_messageInfo_Install_Flag.DiscardUnknown(m)
}
var xxx_messageInfo_Install_Flag proto.InternalMessageInfo
func (m *Install_Flag) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Install_Flag) GetValue() string {
if m != nil {
return m.Value
}
return ""
}
func init() {
proto.RegisterType((*All)(nil), "linkerd2.config.All")
proto.RegisterType((*Global)(nil), "linkerd2.config.Global")
@ -559,64 +666,70 @@ func init() {
proto.RegisterType((*AutoInjectContext)(nil), "linkerd2.config.AutoInjectContext")
proto.RegisterType((*IdentityContext)(nil), "linkerd2.config.IdentityContext")
proto.RegisterType((*LogLevel)(nil), "linkerd2.config.LogLevel")
proto.RegisterType((*Install)(nil), "linkerd2.config.Install")
proto.RegisterType((*Install_Flag)(nil), "linkerd2.config.Install.Flag")
}
func init() { proto.RegisterFile("config/config.proto", fileDescriptor_config_fd709b401e3b0efb) }
func init() { proto.RegisterFile("config/config.proto", fileDescriptor_config_0f2e36314897e9fa) }
var fileDescriptor_config_fd709b401e3b0efb = []byte{
// 850 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0x51, 0x6f, 0xdb, 0x36,
0x10, 0x86, 0x13, 0x3b, 0xb5, 0xcf, 0x4e, 0x13, 0x33, 0xe9, 0xaa, 0x74, 0xd8, 0xe6, 0x09, 0x28,
0x50, 0x6c, 0x83, 0x8d, 0xa5, 0xc3, 0x56, 0xf4, 0x69, 0x5e, 0xdb, 0x05, 0x46, 0xb3, 0x2d, 0xd0,
0xd0, 0x97, 0xbd, 0x10, 0xb2, 0x74, 0x51, 0xb9, 0x50, 0xa4, 0x4b, 0x91, 0x4d, 0xfa, 0x67, 0xf6,
0x53, 0xf6, 0x1b, 0xf6, 0x67, 0xf6, 0x3e, 0xf0, 0x48, 0x75, 0x69, 0xdc, 0xf8, 0x49, 0xd2, 0x77,
0xdf, 0xf7, 0xdd, 0xe9, 0x78, 0x3a, 0xc1, 0x41, 0xa1, 0xd5, 0xb9, 0xa8, 0x66, 0xe1, 0x32, 0x5d,
0x19, 0x6d, 0x35, 0xdb, 0x93, 0x42, 0x5d, 0xa0, 0x29, 0x8f, 0xa7, 0x01, 0x7e, 0xf0, 0x79, 0xa5,
0x75, 0x25, 0x71, 0x46, 0xe1, 0xa5, 0x3b, 0x9f, 0x95, 0xce, 0xe4, 0x56, 0x68, 0x15, 0x04, 0x69,
0x09, 0xdb, 0x73, 0x29, 0xd9, 0x0c, 0x76, 0x2a, 0xa9, 0x97, 0xb9, 0x4c, 0x3a, 0x93, 0xce, 0xa3,
0xe1, 0xf1, 0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 0x87, 0x84, 0x3d, 0x27, 0x88, 0x7d,
0x05, 0xe3, 0x40, 0xc9, 0x55, 0xf1, 0x5a, 0x9b, 0x86, 0xaf, 0xb0, 0x8e, 0x55, 0xef, 0x51, 0x60,
0x1e, 0xf0, 0x33, 0xac, 0xd9, 0xcf, 0x30, 0x16, 0x4d, 0xe3, 0x72, 0x55, 0x20, 0x97, 0xe2, 0x1c,
0xad, 0xa8, 0x31, 0x7e, 0xd0, 0x47, 0xd3, 0xf0, 0xcf, 0x98, 0xb6, 0xff, 0x8c, 0xe9, 0xf3, 0xf8,
0xcf, 0xc8, 0xf6, 0x5b, 0xcd, 0x69, 0x94, 0xb0, 0x97, 0x70, 0x58, 0x48, 0x5d, 0x5c, 0xf0, 0xe6,
0x02, 0x2f, 0x79, 0x2e, 0xa5, 0xbe, 0xf4, 0xf1, 0xb8, 0x6a, 0x37, 0x58, 0x31, 0x92, 0xfd, 0x7e,
0x81, 0x97, 0xf3, 0x56, 0x94, 0x4e, 0xa0, 0xdf, 0x0e, 0x19, 0x3b, 0x84, 0x5e, 0x18, 0xc7, 0xf0,
0xa2, 0xe1, 0xe1, 0xa7, 0xc7, 0x7f, 0x7c, 0x5b, 0x09, 0xfb, 0xda, 0x2d, 0xa7, 0x85, 0xae, 0x67,
0x71, 0x42, 0xdb, 0xeb, 0xf1, 0x2c, 0xee, 0x1c, 0x89, 0x66, 0x56, 0xa1, 0x8a, 0xbf, 0xc6, 0xe5,
0x0e, 0x65, 0x7f, 0xfc, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x43, 0x53, 0xc5, 0x64, 0x32, 0x07,
0x00, 0x00,
var fileDescriptor_config_0f2e36314897e9fa = []byte{
// 918 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0xcf, 0x6f, 0x23, 0x35,
0x14, 0x56, 0xda, 0xa4, 0x4d, 0x5e, 0xd2, 0x6d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 0xb9, 0xd4, 0xf9, 0x45, 0x56, 0x5f,
0xf0, 0xab, 0x8c, 0x49, 0xa9, 0xaf, 0x7c, 0x3c, 0x76, 0xcf, 0x35, 0x56, 0x04, 0x65, 0x3f, 0x5d,
0xf0, 0xab, 0x69, 0x23, 0x4a, 0x47, 0xd0, 0x6d, 0x8a, 0x8c, 0x1c, 0x40, 0x27, 0x94, 0x63, 0xf8,
0xd1, 0x30, 0x49, 0xff, 0x6a, 0xc1, 0x76, 0x7c, 0x30, 0xfc, 0x79, 0x3b, 0x5f, 0xcc, 0x81, 0x80,
0x63, 0x7c, 0x03, 0xa4, 0xc8, 0x9a, 0x36, 0x1f, 0x8b, 0x25, 0x97, 0xe2, 0x97, 0xd8, 0xe9, 0x4f,
0xa0, 0xb3, 0x90, 0xac, 0xac, 0x93, 0x4d, 0x6c, 0x18, 0x0f, 0xef, 0x7a, 0x8e, 0xc6, 0x2f, 0x25,
0x2b, 0x69, 0xe0, 0x1e, 0x7d, 0x01, 0x6d, 0x3f, 0xf5, 0x2b, 0xde, 0xa8, 0x51, 0x1c, 0xfb, 0x3c,
0x2f, 0x99, 0x74, 0x3c, 0xae, 0x15, 0x26, 0xdf, 0x9d, 0xfc, 0xfa, 0x65, 0x29, 0xec, 0x6b, 0x37,
0x1f, 0xe7, 0xba, 0x9a, 0xc4, 0x35, 0x9a, 0xef, 0xf1, 0x24, 0xf6, 0x46, 0xc9, 0xcd, 0xa4, 0xe4,
0x2a, 0x3e, 0xe5, 0xf3, 0x2d, 0xdc, 0xa5, 0x93, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x43, 0xf7,
0x8e, 0x9a, 0xe2, 0x07, 0x00, 0x00,
}

View File

@ -1,8 +1,9 @@
package config
import (
"bytes"
"fmt"
"io/ioutil"
"strings"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
@ -10,8 +11,6 @@ import (
log "github.com/sirupsen/logrus"
)
var unmarshaler = jsonpb.Unmarshaler{}
// Global returns the Global protobuf config from the linkerd-config ConfigMap
func Global(filepath string) (*pb.Global, error) {
config := &pb.Global{}
@ -29,17 +28,38 @@ func Proxy(filepath string) (*pb.Proxy, error) {
func unmarshalConfig(filepath string, msg proto.Message) error {
configJSON, err := ioutil.ReadFile(filepath)
if err != nil {
log.Errorf("error reading %s: %s", filepath, err)
return err
return fmt.Errorf("failed to read config file: %s", err)
}
log.Debugf("%s config JSON: %s", filepath, configJSON)
err = unmarshaler.Unmarshal(bytes.NewReader(configJSON), msg)
if err != nil {
log.Errorf("error unmarshaling %s: %s", filepath, err)
return err
if err = unmarshal(string(configJSON), msg); err != nil {
return fmt.Errorf("failed to unmarshal JSON from: %s: %s", filepath, err)
}
return nil
}
func unmarshal(json string, msg proto.Message) error {
// If we're using older code to read a newer config, blowing up during decoding
// is not helpful. We should detect that through other means.
u := jsonpb.Unmarshaler{AllowUnknownFields: true}
return u.Unmarshal(strings.NewReader(json), msg)
}
// ToJSON encode the configuration to JSON, i.e. to be stored in a ConfigMap.
func ToJSON(configs *pb.All) (global, proxy, install string, err error) {
m := jsonpb.Marshaler{EmitDefaults: true}
global, err = m.MarshalToString(configs.GetGlobal())
if err != nil {
return
}
proxy, err = m.MarshalToString(configs.GetProxy())
if err != nil {
return
}
install, err = m.MarshalToString(configs.GetInstall())
return
}

View File

@ -9,6 +9,7 @@ option go_package = "github.com/linkerd/linkerd2/controller/gen/config";
message All {
Global global = 1;
Proxy proxy = 2;
Install install = 3;
}
message Global {
@ -22,8 +23,6 @@ message Global {
// If present, indicates that the Mutating Webhook Admission Controller should
// be configured to automatically inject proxies.
AutoInjectContext auto_inject_context = 6;
string installation_uuid= 5;
}
message Proxy {
@ -74,3 +73,23 @@ message IdentityContext {
message LogLevel {
string level = 1;
}
// Stores information about the last installation/upgrade.
//
// Useful for driving upgrades.
message Install {
// The unique ID for this installation. Does not change on upgrade.
string uuid = 1;
// The CLI version that drove the last install or upgrade.
string cli_version = 2;
// The CLI arguments to the install (or upgrade) command, indicating the
// installer's intent.
repeated Flag flags = 3;
message Flag {
string name = 1;
string value = 2;
}
}

View File

@ -1,5 +1,5 @@
## compile proxy-init utility
FROM gcr.io/linkerd-io/go-deps:cdba5b70 as golang
FROM gcr.io/linkerd-io/go-deps:f39dc9a4 as golang
WORKDIR /go/src/github.com/linkerd/linkerd2
COPY ./proxy-init ./proxy-init
RUN CGO_ENABLED=0 GOOS=linux go install -v ./proxy-init/

View File

@ -26,7 +26,7 @@ COPY web/app .
RUN $ROOT/bin/web build
## compile go server
FROM gcr.io/linkerd-io/go-deps:cdba5b70 as golang
FROM gcr.io/linkerd-io/go-deps:f39dc9a4 as golang
WORKDIR /go/src/github.com/linkerd/linkerd2
RUN mkdir -p web
COPY web/main.go web