Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support offline installation #1894

Closed
willzhang opened this issue Dec 12, 2023 · 6 comments · Fixed by #2266
Closed

Support offline installation #1894

willzhang opened this issue Dec 12, 2023 · 6 comments · Fixed by #2266
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@willzhang
Copy link

willzhang commented Dec 12, 2023

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

#610
#907
#908

@willzhang willzhang added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 12, 2023
@willzhang willzhang changed the title offline install Support offline installation Dec 12, 2023
@jkandasa
Copy link
Member

@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.

@psivananda
Copy link

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

@willzhang
Copy link
Author

willzhang commented Feb 21, 2024

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
Copy link
Author

willzhang commented Feb 21, 2024

@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

@jsteenb2
Copy link

what's the status here on getting this documented? additionally, any progress in making the dashboard img configurable as well? This is a show stopper for us as all images are not pulled from a public registry directly, rather, they go through a proxy. Please advise @jkandasa 👍

@jkandasa jkandasa self-assigned this Jul 25, 2024
@jkandasa
Copy link
Member

@jsteenb2 Thanks to get back this. I started working on dashboard image support on air gap. Also working on documentation about environment variables for images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants