Using my custom profile

Hi,

I have the following file structure:


$ tree .

.

├── pawel-debug-istiooperator.yaml

├── pawel-staging-istiooperator.yaml

└── profiles

├── default.yaml

└── pawel-default.yaml

In this structure pawel-debug-istiooperator.yaml and pawel-staging-istiooperator.yaml refer to pawel-default.yaml. Also, pawel-default.yaml refers to default profile:


$ head -5 pawel-debug-istiooperator.yaml

apiVersion: operator.istio.io/v1alpha1

kind: IstioOperator

spec:

tag: 1.5.1

profile: ./profiles/pawel-default.yaml


$ head -5 pawel-staging-istiooperator.yaml

apiVersion: operator.istio.io/v1alpha1

kind: IstioOperator

spec:

tag: 1.5.1

profile: ./profiles/pawel-default.yaml


$ head -4 profiles/pawel-default.yaml

apiVersion: operator.istio.io/v1alpha1

kind: IstioOperator

spec:

profile: default

When I try to use the upgrade command, I get something like this:


$ istioctl upgrade --dry-run --verbose --filename pawel-debug-istiooperator.yaml

Control Plane - pilot pod - istiod-78d5d88d9b-7tvhg - version: 1.5.1

Control Plane - pilot pod - istiod-78d5d88d9b-pm9kz - version: 1.5.1

Control Plane - pilot pod - istiod-78d5d88d9b-qsjzv - version: 1.5.1

Upgrade version check passed: 1.5.1 -> 1.5.1.

2020-04-20T11:14:26.099235Z info Error: failed to generate IOPS from file: [pawel-debug-istiooperator.yaml] for the current version: 1.5.1, error: open /var/folders/3d/w7ht3mfn4_lfqscjdwc6j9lm0000gp/T/istio-install-packages/istio-1.5.1/install/kubernetes/operator/profiles/profiles/pawel-default.yaml.yaml: no such file or directory

Error: failed to generate IOPS from file: [pawel-debug-istiooperator.yaml] for the current version: 1.5.1, error: open /var/folders/3d/w7ht3mfn4_lfqscjdwc6j9lm0000gp/T/istio-install-packages/istio-1.5.1/install/kubernetes/operator/profiles/profiles/pawel-default.yaml.yaml: no such file or directory

So my question is: How can I create my custom profile and use let’s say a common part in different environments to apply “Don’t repeat yourself” approach?

Hi Pawel,
What you’re describing is a fairly advanced use case that may be an overkill for your application. Istioctl has built-in profiles that are intended as starting point for user overlays that are passed in with -f. In most cases, your overlay would just reference one of these built-in profiles, without creating a new built-in profile. The built-ins are more geared towards service providers that have to redistribute some version of the charts customized for their managed platform.
For normal users, select the profile that is closest to what you need and pass one or more overlay files using -f. If you want to have multiple configs that have a common overlay, you can create that and pass it as something like:

istioctl manifest apply -f my-base-overlay.yaml -f customization1
istioctl manifest apply -f my-base-overlay.yaml -f customization2

Thanks for your response @ostromart.