#!/bin/bash # shellcheck disable=SC2034,SC2153,SC2155,SC2164 # Copyright Istio Authors. All Rights Reserved. # # 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. #################################################################################################### # WARNING: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT. PLEASE MODIFY THE ORIGINAL MARKDOWN FILE: # docs/setup/install/operator/index.md #################################################################################################### snip_deploy_istio_operator() { istioctl operator init } snip_deploy_istio_operator_watch_ns() { istioctl operator init --watchedNamespaces=istio-namespace1,istio-namespace2 } snip_create_ns_istio_operator() { kubectl create namespace istio-operator } snip_deploy_istio_operator_helm() { helm install istio-operator manifests/charts/istio-operator \ --set watchedNamespaces="istio-namespace1\,istio-namespace2" \ -n istio-operator } snip_install_istio_demo_profile() { kubectl apply -f - < ... 30s istio-ingressgateway LoadBalancer 10.96.189.244 192.168.11.156 ... 30s istiod ClusterIP 10.96.189.20 ... 37s ENDSNIP snip_kubectl_get_pods() { kubectl get pods -n istio-system } ! read -r -d '' snip_kubectl_get_pods_out <<\ENDSNIP NAME READY STATUS RESTARTS AGE istio-egressgateway-696cccb5-m8ndk 1/1 Running 0 68s istio-ingressgateway-86cb4b6795-9jlrk 1/1 Running 0 68s istiod-b47586647-sf6sw 1/1 Running 0 74s ENDSNIP snip_update_to_default_profile() { kubectl apply -f - </bin/istioctl operator init } snip_inplace_upgrade_get_pods_istio_operator() { kubectl get pods --namespace istio-operator \ -o=jsonpath='{range .items[*]}{.metadata.name}{":\t"}{range .spec.containers[*]}{.image}{", "}{end}{"\n"}{end}' } snip_inplace_upgrade_get_pods_istio_system() { kubectl get pods --namespace istio-system \ -o=jsonpath='{range .items[*]}{"\n"}{.metadata.name}{":\t"}{range .spec.containers[*]}{.image}{", "}{end}{"\n"}{end}' } snip_download_istio_previous_version() { curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.18.0 sh - } snip_deploy_operator_previous_version() { istio-1.18.0/bin/istioctl operator init } snip_install_istio_previous_version() { kubectl apply -f - < 15010/TCP,15012/TCP,443/TCP,15014/TCP,853/TCP 2m35s istiod-1-19-4 ClusterIP 10.111.17.49 15010/TCP,15012/TCP,443/TCP,15014/TCP 88s ENDSNIP snip_delete_example_istiocontrolplane() { kubectl delete istiooperators.install.istio.io -n istio-system example-istiocontrolplane } snip_cleanup() { istioctl uninstall -y --purge kubectl delete ns istio-system istio-operator }