Skip to content

Commit

Permalink
Changes to API for mesh config integration (istio#210)
Browse files Browse the repository at this point in the history
* Changes to API for mesh config integration

* Review comments, add strategy

* Add strategy to k8s settings

* Fix unit tests
  • Loading branch information
ostromart authored and istio-testing committed Aug 19, 2019
1 parent 0e53114 commit e909725
Show file tree
Hide file tree
Showing 28 changed files with 8,754 additions and 6,479 deletions.
62 changes: 29 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,14 @@ spec:
trafficManagement:
components:
pilot:
common:
k8s:
resources:
requests:
cpu: 1000m # override from default 500m
memory: 4096Mi # ... default 2048Mi
hpaSpec:
maxReplicas: 10 # ... default 5
minReplicas: 2 # ... default 1
k8s:
resources:
requests:
cpu: 1000m # override from default 500m
memory: 4096Mi # ... default 2048Mi
hpaSpec:
maxReplicas: 10 # ... default 5
minReplicas: 2 # ... default 1
```

The K8s settings are defined in detail in the
Expand Down Expand Up @@ -292,19 +291,18 @@ spec:
level: "default:warning" # override from info
```

Since from 1.3 Helm charts are split up per component, values overrides should be specified under the appropriate component
Values overrides can also be specified for a particular component
([samples/values-pilot.yaml](samples/values-pilot.yaml)):

```yaml
apiVersion: install.istio.io/v1alpha2
kind: IstioControlPlane
spec:
trafficManagement:
components:
pilot:
common:
values:
traceSampling: 0.1 # override from 1.0
values:
mixer:
telemetry:
loadshedding:
latencyThreshold: 200ms
```

### Advanced K8s resource overlays
Expand All @@ -322,24 +320,22 @@ spec:
enabled: true
components:
proxy:
common:
enabled: false
enabled: false
pilot:
common:
k8s:
overlays:
- kind: Deployment
name: istio-pilot
patches:
- path: spec.template.spec.containers.[name:discovery].args.[30m]
value: "60m" # OVERRIDDEN
- path: spec.template.spec.containers.[name:discovery].ports.[containerPort:8080].containerPort
value: 8090 # OVERRIDDEN
- kind: Service
name: istio-pilot
patches:
- path: spec.ports.[name:grpc-xds].port
value: 15099 # OVERRIDDEN
k8s:
overlays:
- kind: Deployment
name: istio-pilot
patches:
- path: spec.template.spec.containers.[name:discovery].args.[30m]
value: "60m" # OVERRIDDEN
- path: spec.template.spec.containers.[name:discovery].ports.[containerPort:8080].containerPort
value: 8090 # OVERRIDDEN
- kind: Service
name: istio-pilot
patches:
- path: spec.ports.[name:grpc-xds].port
value: 15099 # OVERRIDDEN
```

The user-defined overlay uses a path spec that includes the ability to select list items by key. In the example above,
Expand Down
7 changes: 0 additions & 7 deletions cmd/mesh/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,6 @@ func genManifests(inFilename string, setOverlayYAML string) (name.ManifestMap, e

// fetchInstallPackageFromURL downloads installation packages from specified URL.
func fetchInstallPackageFromURL(mergedICPS *v1alpha2.IstioControlPlaneSpec) error {
// for installation path contains version number only
if mergedICPS.Version != "" {
if mergedICPS.InstallPackagePath != "" {
return fmt.Errorf("cannot set both of InstallPackagePath and Version")
}
mergedICPS.InstallPackagePath = helm.InstallURLFromVersion(mergedICPS.Version)
}
if util.IsHTTPURL(mergedICPS.InstallPackagePath) {
uf, err := helm.NewURLFetcher(mergedICPS.InstallPackagePath, "")
if err != nil {
Expand Down
Loading

0 comments on commit e909725

Please sign in to comment.