Istio Operator Spec 如何为 addonComponents 添加 "hub" 参数?

Istio Operator Spec How to Add "hub" argument for addonComponents?

我正在尝试在我们公司环境下的 AKS 上安装 Istio,这意味着我们需要参考 docker 注册中心的内部代理,我正在关注这个 link:https://docs.microsoft.com/en-us/azure/aks/servicemesh-istio-install?pivots=client-operating-system-macos and https://istio.io/latest/docs/reference/config/istio.operator.v1alpha1/#IstioComponentSetSpec

我尝试安装的 Istio 版本是 1.6.13,而不是 1.7.x,因为 1.7.x 与 Kubeflow 不兼容:https://github.com/kubeflow/kubeflow/issues/5434

在构建 IstioOperatorSpec 时,我可以通过提供 hub 参数来使基础工作正常工作,但我无法启用 addonComponents,例如 grafana,因为它们需要来自不同 hub。我的问题是,如何为每个 addonComponents

设置 hub 参数

这个不起作用,因为我在 addonComponents:

下提供了 hub 参数
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  namespace: istio-system
  name: istio-control-plane
spec:
  hub: INTERNAL_DOCKER_HUB_1
  profile: default
  addonComponents:
    grafana:
      enabled: true
      hub: INTERNAL_DOCKER_HUB_2

以下将起作用:

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  namespace: istio-system
  name: istio-control-plane
spec:
  profile: default
  values:
    global:
      hub: INTERNAL_DOCKER_HUB_1
      tag: INT_TAG

如果您想了解参数以及如何指定这些参数,可以查看 istio-discovery/values.yaml。 Helm 需要在变量前加上 values,如上例所示 values.global.hub

我先说 addonComponentsIstioComponent 是两个不同的东西。

根据文档:

所以据我所知,无法在 addonComponents 中设置 hub,因为无法使用 ExternalComponentSpec.

进行配置

如@Joel 和@Rinor 的评论所述

Istio doesn't recommend to use their addons templates for anything else than PoC / demo purpose, they recommend that you create your own templates. Which perhaps would explain if there's no possibility to provide a specific hub. – Joel

Oh but the addons are removed from Istio, he'd have to manually replace the images in the samples if he's going to use those.

这实际上就是您问题的答案,如果您想配置插件、更改图像、添加诸如持久性或高级安全设置之类的东西,您应该考虑创建自己的插件并使用 istio 配置它们。

有插件yamls,您可以将其用作构建自己的设置的参考。


请注意,在 istio 1.8 中,带有 istioctl 的插件安装已被删除。

如前所述here

Istio 1.8: Installation of addons by istioctl is removed.

Removed the bundled addon installations from istioctl and the operator. Istio does not install components that are not delivered by the Istio project. As a result, Istio will stop shipping installation artifacts related to addons. However, Istio will guarantee version compatibility where necessary. It is the user’s responsibility to install these components by using the official Integrations documentation and artifacts provided by the respective projects. For demos, users can deploy simple YAML files from the samples/addons/ directory.