bigkevmcd / tekton-polling-operator

A simple git repository poller.
Apache License 2.0
26 stars 12 forks source link

workspace not binding #8

Closed shohagrana64 closed 2 years ago

shohagrana64 commented 2 years ago

Workspace declared as follows:

apiVersion: polling.tekton.dev/v1alpha1
kind: Repository
metadata:
  name: example-repository
spec:
  url: https://github.com/shohagrana64/java-hello-world-with-maven.git
  ref: master
  frequency: 1m
  type: github
  pipelineRef:
    name: demo-pipeline
    params:
    workspaces:
      - name: source
        persistentVolumeClaim:
          claimName: buildah-pvc-rana

I have created the pvc. my task uses workspace source which is supposed to be given by the pipelinerun. But it is not binding correctly. The error is: PipelineRun default/polled-pipelinerun-8k6vv doesn't bind Pipeline default/demo-pipeline's Workspaces correctly: pipeline requires workspace with name "source" be provided by pipelinerun

shohagrana64 commented 2 years ago

I used the latest release 0.4.0

bigkevmcd commented 2 years ago

Hi Shohaq,

I'm looking into it, not quite sure what's going on, but it also looks like Docker hub removed the image.

I will update the ticket when I know more.

Kevin

On Tue, 18 Jan 2022 at 13:54, Shohag Rana @.***> wrote:

I used the latest release 0.4.0

— Reply to this email directly, view it on GitHub https://github.com/bigkevmcd/tekton-polling-operator/issues/8#issuecomment-1015433214, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGT3IXCJVXO2GMAWSOF7BLUWVWHPANCNFSM5MG3Q7AA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

bigkevmcd commented 2 years ago

I've written an example in here https://github.com/bigkevmcd/tekton-polling-operator/tree/main/examples/workspace that might help.

bigkevmcd commented 2 years ago

Are you definitely running v0.4.0 ?

Check that the image associated with the deployment (or pod) is using the correct v0.4.0 image?

On Tue, 18 Jan 2022 at 15:45, Shohag Rana @.***> wrote:

Thank you for the example. This is exactly how I configured the workspace. Sadly, I am getting the same error

apiVersion: polling.tekton.dev/v1alpha1 kind: Repository metadata: name: example-repository spec: url: https://github.com/shohagrana64/java-hello-world-with-maven.git ref: master frequency: 1m type: github pipelineRef: name: demo-pipeline params: workspaces:

  • name: source persistentVolumeClaim: claimName: buildah-pvc-rana

you can see my demo pipeline here:

apiVersion: tekton.dev/v1beta1 kind: Pipeline metadata: name: demo-pipeline spec: workspaces:

Also my pvc:

apiVersion: v1 kind: PersistentVolumeClaim metadata: name: buildah-pvc-rana spec: storageClassName: manual accessModes:

  • ReadWriteMany resources: requests: storage: 1Gi

— Reply to this email directly, view it on GitHub https://github.com/bigkevmcd/tekton-polling-operator/issues/8#issuecomment-1015540483, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGT3ISURAF5ZASJNGOULTDUWWDHZANCNFSM5MG3Q7AA . You are receiving this because you commented.Message ID: @.***>

shohagrana64 commented 2 years ago

Thanks a lot for your help. Basically what happened was that after applying 0.4.0 from 0.2.0 the base image of 0.2.0 did not change. the fix: I deleted everything kubectl delete -f https://github.com/bigkevmcd/tekton-polling-operator/releases/download/v0.4.0/release-v0.4.0.yaml the applied again kubectl apply -f https://github.com/bigkevmcd/tekton-polling-operator/releases/download/v0.4.0/release-v0.4.0.yaml

and now it works. Thanks a lot. and sorry for the trouble.

bigkevmcd commented 2 years ago

@shohagrana64 No problem at all, I am testing a different way of doing this, which involves sending hook events to triggers, which would simplify the config a lot (it would use standard Tekton ways of doing this).

I just need to find time to do it :-)

shohagrana64 commented 2 years ago

I wish you all the best. Thanks for making such a useful operator. Also, I'm looking forward to the update 😃

bigkevmcd commented 2 years ago

Thanks,

I am hoping to wrap up a new (hopefully simpler to use) version this week

apiVersion: polling.gitops.tools/v1alpha1 kind: PolledRepository metadata: name: polledrepository-sample namespace: default spec: url: https://github.com/gitops-tools/gitpoller-controller.git ref: main type: github frequency: 5m endpoint: http://el-polling-listener.polling-demo.svc.cluster.local:8080

This is sent to a Triggers EventListener so you don't have to deal with Pipelines in the repository, and it's totally decoupled from Tekton (but it does include an example for use with Tekton).

Kevin

On Tue, 18 Jan 2022 at 16:09, Shohag Rana @.***> wrote:

I wish you all the best. Thanks for making such a useful operator. Also, I'm looking forward to the update 😃

— Reply to this email directly, view it on GitHub https://github.com/bigkevmcd/tekton-polling-operator/issues/8#issuecomment-1015564546, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGT3ISYCNAWCRX2ET2NORTUWWGDDANCNFSM5MG3Q7AA . You are receiving this because you commented.Message ID: @.***>