operator icon indicating copy to clipboard operation
operator copied to clipboard

Support offline installation

Open willzhang opened this issue 6 months ago • 4 comments

Feature request

How do I install tekton operator in an offline environment?

Use case

Install tekton in offline environment.

I can't specify the docker image that the tekton operator depends on.

If a similar configuration is supported, it will solve the problem:

apiVersion: operator.tekton.dev/v1alpha1
kind: TektonConfig
metadata:
  name: config
spec:
  profile: all
  targetNamespace: tekton-pipelines
  global_registry_url: my.localregistry.com
  pipeline:
    image: my.localregistry.com/pipeline:v1.0
  triggers:
    image: my.localregistry.com/triggers:v1.0
  chains:
    image: my.localregistry.com/chains:v1.0

Related unresolved and closed issues

https://github.com/tektoncd/operator/issues/610 https://github.com/tektoncd/operator/issues/907 https://github.com/tektoncd/operator/issues/908

willzhang avatar Dec 12 '23 03:12 willzhang

@willzhang have you tried to replace the environment variable to fix the offline installation? something similar to this?

I will get the list of supported image environment variable.

jkandasa avatar Jan 21 '24 17:01 jkandasa

any reference document where we can change / update ENV variables ?

psivananda avatar Feb 15 '24 07:02 psivananda

any reference document where we can change / update ENV variables ?

Only can find here, and no any docs. image

maybe we need

image-url env
gcr.io/tekton-releases/github.com/tektoncd/operator/cmd/kubernetes/proxy-webhook:v0.69.1 IMAGE_PIPELINES_PROXY
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/controller:v0.53.3 IMAGE_PIPELINES_TEKTON_PIPELINES_CONTROLLER
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/events:v0.53.3 IMAGE_PIPELINES_TEKTON_EVENTS_CONTROLLER
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/resolvers:v0.53.3 IMAGE_PIPELINES_CONTROLLER
gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/webhook:v0.53.3 IMAGE_PIPELINES_WEBHOOK
gcr.io/tekton-releases/github.com/tektoncd/triggers/cmd/controller:v0.25.3 IMAGE_TRIGGERS_TEKTON_TRIGGERS_CONTROLLER
gcr.io/tekton-releases/github.com/tektoncd/triggers/cmd/interceptors:v0.25.3 IMAGE_TRIGGERS_TEKTON_TRIGGERS_CORE_INTERCEPTORS
gcr.io/tekton-releases/github.com/tektoncd/triggers/cmd/webhook:v0.25.3 IMAGE_TRIGGERS_WEBHOOK
gcr.io/tekton-releases/github.com/tektoncd/chains/cmd/controller:v0.19.0 IMAGE_CHAINS_TEKTON_CHAINS_CONTROLLER
registry.zot.com/tekton-releases/dogfooding/tkn:latest IMAGE_JOB_PRUNER_TKN
gcr.io/tekton-releases/github.com/tektoncd/operator/cmd/kubernetes/operator:v0.69.1 manaul replace with sed in yaml
gcr.io/tekton-releases/github.com/tektoncd/operator/cmd/kubernetes/webhook:v0.69.1 manaul replace with sed in yaml
gcr.io/tekton-releases/github.com/tektoncd/dashboard/cmd/dashboard:v0.41.0 not support yet
...... ......

willzhang avatar Feb 21 '24 12:02 willzhang

@willzhang have you tried to replace the environment variable to fix the offline installation? something similar to this?

I will get the list of supported image environment variable.

Yes, i have try,this is work

wget https://storage.googleapis.com/tekton-releases/operator/previous/v0.69.1/release.yaml

change release.yaml env

apiVersion: apps/v1
kind: Deployment
metadata:
  name: tekton-operator
  namespace: tekton-operator
spec:
  template:
    spec:
      containers:
        - name: tekton-operator-lifecycle
          image: registry.cn-shenzhen.aliyuncs.com/cnmirror/tekton-operator:v0.69.1
          env:
            - name: IMAGE_PIPELINES_PROXY
              value: registry.zot.com:5000/tekton-releases/github.com/tektoncd/operator/cmd/kubernetes/proxy-webhook:v0.69.1
            - name: IMAGE_PIPELINES_TEKTON_EVENTS_CONTROLLER
              value: registry.zot.com:5000/tekton-releases/github.com/tektoncd/pipeline/cmd/events:v0.53.3
            - name: IMAGE_PIPELINES_WEBHOOK
              value: registry.zot.com:5000/tekton-releases/github.com/tektoncd/pipeline/cmd/webhook:v0.53.3
            - name: IMAGE_PIPELINES_TEKTON_PIPELINES_CONTROLLER
              value: registry.zot.com:5000/tekton-releases/github.com/tektoncd/pipeline/cmd/controller:v0.53.3
            - name: IMAGE_PIPELINES_CONTROLLER
              value: registry.zot.com:5000/tekton-releases/github.com/tektoncd/pipeline/cmd/resolvers:v0.53.3
            - name: IMAGE_TRIGGERS_TEKTON_TRIGGERS_CORE_INTERCEPTORS
              value: registry.zot.com:5000/tekton-releases/github.com/tektoncd/triggers/cmd/interceptors:v0.25.3
            - name: IMAGE_TRIGGERS_TEKTON_TRIGGERS_CONTROLLER
              value: registry.zot.com:5000/tekton-releases/github.com/tektoncd/triggers/cmd/controller:v0.25.3
            - name: IMAGE_TRIGGERS_WEBHOOK
              value: registry.zot.com:5000/tekton-releases/github.com/tektoncd/triggers/cmd/webhook:v0.25.3
            - name: IMAGE_CHAINS_TEKTON_CHAINS_CONTROLLER
              value: registry.zot.com:5000/tekton-releases/github.com/tektoncd/chains/cmd/controller:v0.19.0
            - name: IMAGE_JOB_PRUNER_TKN
              value: registry.zot.com:5000/tekton-releases/dogfooding/tkn:latest
kubectl apply -f release.yaml
root@node1:~# kubectl -n tekton-pipelines get pods
NAME                                                 READY   STATUS    RESTARTS   AGE
tekton-chains-controller-797b4b7db5-wvfhx            1/1     Running   0          20m
tekton-dashboard-6685748fd7-4zfk8                    1/1     Running   0          17m
tekton-events-controller-c7b7db8d7-cdb48             1/1     Running   0          20m
tekton-operator-proxy-webhook-554b69d9b6-8cvbv       1/1     Running   0          20m
tekton-pipelines-controller-6b8d99dd9b-fdzj4         1/1     Running   0          20m
tekton-pipelines-remote-resolvers-86bccb68cc-zqq4p   1/1     Running   0          20m
tekton-pipelines-webhook-7745484f8d-bn4md            1/1     Running   0          20m
tekton-triggers-controller-7cf7696878-cclfz          1/1     Running   0          20m
tekton-triggers-core-interceptors-6d964f57d9-v4dpp   1/1     Running   0          20m
tekton-triggers-webhook-566dfd4fb7-xnddh             1/1     Running   0          20m

root@node1:~# kubectl -n tekton-pipelines get pods -o yaml |grep image: | sort -u
      image: registry.zot.com:5000/tekton-releases/github.com/tektoncd/chains/cmd/controller:v0.19.0
      image: registry.zot.com:5000/tekton-releases/github.com/tektoncd/dashboard/cmd/dashboard:v0.41.0
      image: registry.zot.com:5000/tekton-releases/github.com/tektoncd/operator/cmd/kubernetes/proxy-webhook:v0.69.1
      image: registry.zot.com:5000/tekton-releases/github.com/tektoncd/pipeline/cmd/controller:v0.53.3
      image: registry.zot.com:5000/tekton-releases/github.com/tektoncd/pipeline/cmd/events:v0.53.3
      image: registry.zot.com:5000/tekton-releases/github.com/tektoncd/pipeline/cmd/resolvers:v0.53.3
      image: registry.zot.com:5000/tekton-releases/github.com/tektoncd/pipeline/cmd/webhook:v0.53.3
      image: registry.zot.com:5000/tekton-releases/github.com/tektoncd/triggers/cmd/controller:v0.25.3
      image: registry.zot.com:5000/tekton-releases/github.com/tektoncd/triggers/cmd/interceptors:v0.25.3
      image: registry.zot.com:5000/tekton-releases/github.com/tektoncd/triggers/cmd/webhook:v0.25.3

willzhang avatar Feb 21 '24 12:02 willzhang