Skip to content

Commit

Permalink
Merge branch 'release-1.1' into master-merge-again
Browse files Browse the repository at this point in the history
  • Loading branch information
howardjohn committed May 14, 2019
2 parents c2d324a + 04850e1 commit aa554e7
Show file tree
Hide file tree
Showing 51 changed files with 681 additions and 371 deletions.
4 changes: 2 additions & 2 deletions install/kubernetes/helm/istio/charts/certmanager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ nodeSelector: {}
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ spec:
- --livenessProbePath=/healthliveness
- --readinessProbePath=/healthready
- --readinessProbeInterval=1s
- --deployment-namespace={{ .Release.Namespace }}
{{- if $.Values.global.controlPlaneSecurityEnabled}}
- --insecure=false
{{- else }}
Expand Down
4 changes: 2 additions & 2 deletions install/kubernetes/helm/istio/charts/galley/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ nodeSelector: {}
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
matchExpressions:
- key: {{ $item.key }}
operator: {{ $item.operator }}
{{- if $item.value }}
{{- if $item.values }}
values:
{{- $vals := split "," $item.values }}
{{- range $i, $v := $vals }}
Expand All @@ -88,6 +88,5 @@
{{- end }}
{{- end }}
topologyKey: {{ $item.topologyKey }}
weight: 100
{{- end }}
{{- end }}
8 changes: 4 additions & 4 deletions install/kubernetes/helm/istio/charts/gateways/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ istio-ingressgateway:
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []

istio-egressgateway:
enabled: false
Expand Down Expand Up @@ -208,8 +208,8 @@ istio-egressgateway:
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []

# Mesh ILB gateway creates a gateway of type InternalLoadBalancer,
# for mesh expansion. It exposes the mtls ports for Pilot,CA as well
Expand Down
4 changes: 2 additions & 2 deletions install/kubernetes/helm/istio/charts/grafana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ nodeSelector: {}
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []

contextPath: /grafana
service:
Expand Down
4 changes: 2 additions & 2 deletions install/kubernetes/helm/istio/charts/istiocoredns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ nodeSelector: {}
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []
4 changes: 2 additions & 2 deletions install/kubernetes/helm/istio/charts/kiali/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ nodeSelector: {}
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []

ingress:
enabled: false
Expand Down
4 changes: 2 additions & 2 deletions install/kubernetes/helm/istio/charts/mixer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ nodeSelector: {}
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []

adapters:
kubernetesenv:
Expand Down
4 changes: 2 additions & 2 deletions install/kubernetes/helm/istio/charts/nodeagent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ nodeSelector: {}
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []
4 changes: 2 additions & 2 deletions install/kubernetes/helm/istio/charts/pilot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ nodeSelector: {}
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []

# The following is used to limit how long a sidecar can be connected
# to a pilot. It balances out load across pilot instances at the cost of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ spec:
serviceAccountName: prometheus
{{- if .Values.global.priorityClassName }}
priorityClassName: "{{ .Values.global.priorityClassName }}"
{{- end }}
{{- if .Values.security.enabled }}
initContainers:
- name: prom-init
image: "busybox:1.30.1"
command: ['sh', '-c', 'counter=0; until [ "$counter" -ge 30 ]; do if [ -f /etc/istio-certs/key.pem ]; then exit 0; else echo waiting for istio certs && sleep 1 && counter=$((counter+1)); fi; done; exit 1;']
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
volumeMounts:
- mountPath: /etc/istio-certs
name: istio-certs
{{- end }}
containers:
- name: prometheus
Expand Down Expand Up @@ -74,7 +64,9 @@ spec:
- name: istio-certs
secret:
defaultMode: 420
{{- if not .Values.security.enabled }}
optional: true
{{- end }}
secretName: istio.default
affinity:
{{- include "nodeaffinity" . | indent 6 }}
Expand Down
4 changes: 2 additions & 2 deletions install/kubernetes/helm/istio/charts/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ nodeSelector: {}
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []

# Controls the frequency of prometheus scraping
scrapeInterval: 15s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
release: {{ .Release.Name }}
istio: citadel
spec:
replicas: {{ .Values.replicaCount }}
replicas: 1
selector:
matchLabels:
istio: citadel
Expand Down
5 changes: 2 additions & 3 deletions install/kubernetes/helm/istio/charts/security/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# security configuration
#
enabled: true
replicaCount: 1
image: citadel
selfSigned: true # indicate if self-signed CA is used.
createMeshPolicy: true
Expand All @@ -26,5 +25,5 @@ nodeSelector: {}
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ nodeSelector: {}
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []

# If true, webhook or istioctl injector will rewrite PodSpec for liveness
# health check to redirect request to sidecar. This makes liveness check work
Expand Down
4 changes: 2 additions & 2 deletions install/kubernetes/helm/istio/charts/tracing/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ nodeSelector: {}
# This pod anti-affinity rule says that the pod requires not to be scheduled
# onto a node if that node is already running a pod with label having key
# “security” and value “S1”.
podAntiAffinityLabelSelector: {}
podAntiAffinityTermLabelSelector: {}
podAntiAffinityLabelSelector: []
podAntiAffinityTermLabelSelector: []

jaeger:
hub: docker.io/jaegertracing
Expand Down
3 changes: 1 addition & 2 deletions install/kubernetes/helm/istio/templates/_affinity.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
matchExpressions:
- key: {{ $item.key }}
operator: {{ $item.operator }}
{{- if $item.value }}
{{- if $item.values }}
values:
{{- $vals := split "," $item.values }}
{{- range $i, $v := $vals }}
Expand All @@ -88,6 +88,5 @@
{{- end }}
{{- end }}
topologyKey: {{ $item.topologyKey }}
weight: 100
{{- end }}
{{- end }}
45 changes: 1 addition & 44 deletions pilot/cmd/pilot-agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ var (
concurrency int
templateFile string
disableInternalTelemetry bool
tlsServerCertChain string
tlsServerKey string
tlsServerRootCert string
tlsClientCertChain string
tlsClientKey string
tlsClientRootCert string
tlsCertsToWatch []string
loggingOptions = log.DefaultOptions()

Expand Down Expand Up @@ -159,30 +153,9 @@ var (
role.TrustDomain = spiffe.GetTrustDomain()
log.Infof("Proxy role: %#v", role)

// Add cert paths as node metadata only if they differ from defaults
if tlsServerCertChain != model.DefaultCertChain {
role.Metadata[model.NodeMetadataTLSServerCertChain] = tlsServerCertChain
}
if tlsServerKey != model.DefaultKey {
role.Metadata[model.NodeMetadataTLSServerKey] = tlsServerKey
}
if tlsServerRootCert != model.DefaultRootCert {
role.Metadata[model.NodeMetadataTLSServerRootCert] = tlsServerRootCert
}

if tlsClientCertChain != model.DefaultCertChain {
role.Metadata[model.NodeMetadataTLSClientCertChain] = tlsClientCertChain
}
if tlsClientKey != model.DefaultKey {
role.Metadata[model.NodeMetadataTLSClientKey] = tlsClientKey
}
if tlsClientRootCert != model.DefaultRootCert {
role.Metadata[model.NodeMetadataTLSClientRootCert] = tlsClientRootCert
}

tlsCertsToWatch = []string{
tlsServerCertChain, tlsServerKey, tlsServerRootCert,
tlsClientCertChain, tlsClientKey, tlsClientCertChain,
tlsClientCertChain, tlsClientKey, tlsClientRootCert,
}

// dedupe cert paths so we don't set up 2 watchers for the same file:
Expand Down Expand Up @@ -567,22 +540,6 @@ func init() {
proxyCmd.PersistentFlags().BoolVar(&controlPlaneBootstrap, "controlPlaneBootstrap", true,
"Process bootstrap provided via templateFile to be used by control plane components.")

// server certs
proxyCmd.PersistentFlags().StringVar(&tlsServerCertChain, "tlsServerCertChain",
model.DefaultCertChain, "Absolute path to server cert-chain file used for istio mTLS")
proxyCmd.PersistentFlags().StringVar(&tlsServerKey, "tlsServerKey",
model.DefaultKey, "Absolute path to server private key file used for istio mTLS")
proxyCmd.PersistentFlags().StringVar(&tlsServerRootCert, "tlsServerRootCert",
model.DefaultRootCert, "Absolute path to server root cert file used for istio mTLS")

// client certs
proxyCmd.PersistentFlags().StringVar(&tlsClientCertChain, "tlsClientCertChain",
model.DefaultCertChain, "Absolute path to client cert-chain file used for istio mTLS")
proxyCmd.PersistentFlags().StringVar(&tlsClientKey, "tlsSClientKey",
model.DefaultKey, "Absolute path to client key file used for istio mTLS")
proxyCmd.PersistentFlags().StringVar(&tlsClientRootCert, "tlsClientRootCert",
model.DefaultRootCert, "Absolute path to client root cert file used for istio mTLS")

// Attach the Istio logging options to the command.
loggingOptions.AttachCobraFlags(rootCmd)

Expand Down
31 changes: 31 additions & 0 deletions pilot/cmd/pilot-agent/model.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2019 Istio Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package main

import (
"istio.io/istio/pilot/pkg/model"
"istio.io/istio/pkg/bootstrap"
"istio.io/pkg/env"
)

var (
tlsServerCertChain = env.RegisterStringVar(bootstrap.IstioMetaPrefix+model.NodeMetadataTLSServerCertChain, model.DefaultCertChain, "").Get()
tlsServerKey = env.RegisterStringVar(bootstrap.IstioMetaPrefix+model.NodeMetadataTLSServerKey, model.DefaultKey, "").Get()
tlsServerRootCert = env.RegisterStringVar(bootstrap.IstioMetaPrefix+model.NodeMetadataTLSServerRootCert, model.DefaultRootCert, "").Get()

tlsClientCertChain = env.RegisterStringVar(bootstrap.IstioMetaPrefix+model.NodeMetadataTLSClientCertChain, model.DefaultCertChain, "").Get()
tlsClientKey = env.RegisterStringVar(bootstrap.IstioMetaPrefix+model.NodeMetadataTLSClientKey, model.DefaultKey, "").Get()
tlsClientRootCert = env.RegisterStringVar(bootstrap.IstioMetaPrefix+model.NodeMetadataTLSClientRootCert, model.DefaultRootCert, "").Get()
)
6 changes: 4 additions & 2 deletions pilot/pkg/bootstrap/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ func (s *Server) initMeshNetworks(args *PilotArgs) error { //nolint: unparam
return nil
}
log.Infof("mesh networks configuration %s", spew.Sdump(meshNetworks))
util.ResolveHostsInNetworksConfig(s.meshNetworks)
util.ResolveHostsInNetworksConfig(meshNetworks)
log.Infof("mesh networks configuration post-resolution %s", spew.Sdump(meshNetworks))
s.meshNetworks = meshNetworks

// Watch the networks config file for changes and reload if it got modified
Expand All @@ -448,7 +449,8 @@ func (s *Server) initMeshNetworks(args *PilotArgs) error { //nolint: unparam
}
if !reflect.DeepEqual(meshNetworks, s.meshNetworks) {
log.Infof("mesh networks configuration file updated to: %s", spew.Sdump(meshNetworks))
util.ResolveHostsInNetworksConfig(s.meshNetworks)
util.ResolveHostsInNetworksConfig(meshNetworks)
log.Infof("mesh networks configuration post-resolution %s", spew.Sdump(meshNetworks))
s.meshNetworks = meshNetworks
if s.kubeRegistry != nil {
s.kubeRegistry.InitNetworkLookup(meshNetworks)
Expand Down
4 changes: 4 additions & 0 deletions pilot/pkg/model/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,10 @@ const (
// NodeMetadataPolicyCheckMaxRetryWaitTime for max time to wait between retries
// In duration format. If not set, this will be 1000ms.
NodeMetadataPolicyCheckMaxRetryWaitTime = "policy.istio.io/checkMaxRetryWaitTime"

// NodeMetadataIdleTimeout specifies the idle timeout for the proxy, in duration format (10s).
// If not set, no timeout is set.
NodeMetadataIdleTimeout = "IDLE_TIMEOUT"
)

var (
Expand Down
Loading

0 comments on commit aa554e7

Please sign in to comment.