When applying the Kubernetes resource Tekton EventListener, it keeps complaining:
Operation cannot be fulfilled on deployments.apps "el-event-listener-test-starter": the object has been modified; please apply your changes to the latest version and try again
As seen in other posts, I don't use any time fields, ids or versions. So, that is not interfering.
Context is that there is another EventListener listening as a different service to the same port.
Of course I delete the EventListener, etc each time and build it up again. In Lens I can verify that no resources are left behind.
The deployment (including RS and PODs) are all working fine, everything is in green.
How to move forward? How to find the issue?
The event listener is:
apiVersion: triggers.tekton.dev/v1beta1
kind: EventListener
metadata:
name: event-listener-test-starter
spec:
serviceAccountName: tekton-service-account
triggers:
- name: test-starter-trigger
bindings:
- ref: test-starter-binding
template:
ref: test-starter-template
---
apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerBinding
metadata:
name: test-starter-binding
spec:
params:
- name: testversion
value: $(body.testversion)
- name: appTargetBranch
value: $(body.apptargetbranch)
---
apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerTemplate
metadata:
name: test-starter-template
spec:
params:
- name: testversion
- name: appTargetBranch
resourcetemplates:
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: test-pipeline-
spec:
serviceAccountName: build-bot
pipelineRef:
name: test-pipeline
workspaces:
- name: test-source-workspace
persistentVolumeClaim:
claimName: test-source-pvc
- name: maven-settings
subPath: mavensettings
persistentVolumeClaim:
claimName: mavensettingsv2-pvc
- name: config-source
subPath: config-source
persistentVolumeClaim:
claimName: configrepo2-pvc
params:
- name: TEST_SOURCE_URL
value: http://gitea-xxx-http.default.svc.cluster.local:3000/gituser/functionaltester.git
- name: TEST_SOURCE_REVISION
value: $(tt.params.testversion)
- name: GIT_CONFIG_TARGET_BRANCH
value: $(tt.params.appTargetBranch)
I use tekton-pipelines v0.53.0 and tekton-triggers v0.25.3.
When merging both EventListeners together the error disappears. All other objects are the same.
In the EventListener part I seperate the events based on header fields.
Although I mitigated the issue, I am very curious if this is due to missing information or a technical limitation. I am very open to suggestions.