SSP

SSP Operator定义

SSP Operator 是一个基于 Golang 编写的 Operator,负责部署 kubevirt-tekton-tasks 和示例CI。

SSP 作为hyperconverged-cluster-operator的一部分,也可以由用户从最新版本独立部署。

备注

SSP 需要 Tekton 才能工作。

默认情况下,SSP 不部署 KubeVirt Tekton 任务资源。 用户必须在 HCO CR 中启用 deployTektonTaskResources 特性门控才能部署其所有资源:

1
2
3
4
5
6
7
8
apiVersion: hco.kubevirt.io/v1beta1
kind: HyperConverged
metadata:
  name: kubevirt-hyperconverged
  namespace: kubevirt-hyperconverged
spec:
  featureGates:
    deployTektonTaskResources: true

或者是在SSP CR,

1
2
3
4
5
6
7
8
apiVersion: ssp.kubevirt.io/v1beta2
kind: SSP
metadata:
  name: ssp
  namespace: kubevirt
spec:
  featureGates:
    deployTektonTaskResources: true

用户可以通过命令行在HCO CR中启用 deployTektonTaskResources 特性门控:

kubectl patch hco kubevirt-hyperconverged  --type=merge -p '{"spec":{"featureGates": {"deployTektonTaskResources": true}}}'
oc patch hco kubevirt-hyperconverged  --type=merge -p '{"spec":{"featureGates": {"deployTektonTaskResources": true}}}'

或者通过patch给SSP CR打补丁,

kubectl patch ssp ssp  --type=merge -p '{"spec":{"featureGates": {"deployTektonTaskResources": true}}}'
oc patch ssp ssp  --type=merge -p '{"spec":{"featureGates": {"deployTektonTaskResources": true}}}'

一旦特性门控spec.featureGates.deployTektonTaskResources被置为true时,SSP将不会删除任何任务和示例CI,就算是特性门控回置成false

用户可以通过在HCO CR中配置两个字段 spec.tektonPipelinesNamespacespec.tektonTasksNamespace将示例CI或者任务部署到哪个命名空间下,

1
2
3
4
5
6
7
8
apiVersion: hco.kubevirt.io/v1beta1
kind: HyperConverged
metadata:
  name: kubevirt-hyperconverged
  namespace: kubevirt-hyperconverged
spec:
  tektonPipelinesNamespace: userNamespace
  tektonTasksNamespace: userNamespace

或者在SSP CR中配置两个字段 spec.tektonPipelines.namespacespec.tektonTasks.namespace:

apiVersion: ssp.kubevirt.io/v1beta2
kind: SSP
metadata:
  name: ssp
  namespace: kubevirt
spec:
  tektonPipelines:
    namespace: kubevirt
  tektonTasks:
    namespace: kubevirt

最后更新: 2023-08-31
创建日期: 2023-08-15

评论