forked from tektoncd/triggers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autopilot requires resource requests in EL deployments. Otherwise, there's a contention between controller and GKE autopilot for changing deployment.
- Loading branch information
1 parent
2950c8b
commit c629830
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
examples/v1beta1/eventlisteners/eventlistener-gke-autopilot.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# This example shows how to deploy EventListener to GKE Autopilot. | ||
# It's necessary to specify resource request for EL in GKE Autopilot. | ||
--- | ||
apiVersion: triggers.tekton.dev/v1beta1 | ||
kind: EventListener | ||
metadata: | ||
name: listener-podtemplate | ||
spec: | ||
serviceAccountName: tekton-triggers-example-sa | ||
resources: | ||
kubernetesResource: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- resources: | ||
requests: | ||
memory: "128Mi" | ||
cpu: "250m" | ||
limits: | ||
memory: "256Mi" | ||
cpu: "500m" | ||
triggers: | ||
- name: foo-trig | ||
bindings: | ||
- name: message | ||
value: Hello from the Triggers EventListener! | ||
- name: gitrevision | ||
value: $(body.head_commit.id) | ||
- name: gitrepositoryurl | ||
value: $(body.repository.url) | ||
- name: contenttype | ||
value: $(header.Content-Type) | ||
template: | ||
spec: | ||
params: | ||
- name: gitrevision | ||
description: The git revision | ||
default: main | ||
- name: gitrepositoryurl | ||
description: The git repository url | ||
- name: message | ||
description: The message to print | ||
default: This is the default message | ||
- name: contenttype | ||
description: The Content-Type of the event | ||
resourcetemplates: | ||
- apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
generateName: simple-pipeline-run- | ||
spec: | ||
pipelineRef: | ||
name: simple-pipeline | ||
params: | ||
- name: message | ||
value: $(tt.params.message) | ||
- name: contenttype | ||
value: $(tt.params.contenttype) | ||
resources: | ||
- name: git-source | ||
resourceSpec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: $(tt.params.gitrevision) | ||
- name: url | ||
value: $(tt.params.gitrepositoryurl) |