Skip to content

Commit

Permalink
add recommended k8s labels
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-edouard.breteche authored and tekton-robot committed Apr 29, 2020
1 parent 0e87eaa commit 4060450
Show file tree
Hide file tree
Showing 17 changed files with 90 additions and 14 deletions.
3 changes: 3 additions & 0 deletions config/101-podsecuritypolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: tekton-triggers
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
spec:
privileged: false
allowPrivilegeEscalation: false
Expand Down
3 changes: 3 additions & 0 deletions config/200-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: tekton-triggers-admin
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
rules:
- apiGroups: [""]
resources: ["configmaps", "secrets", "services"]
Expand Down
3 changes: 3 additions & 0 deletions config/200-serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ kind: ServiceAccount
metadata:
name: tekton-triggers-controller
namespace: tekton-pipelines
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
3 changes: 3 additions & 0 deletions config/201-clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: tekton-triggers-controller-admin
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
subjects:
- kind: ServiceAccount
name: tekton-triggers-controller
Expand Down
2 changes: 2 additions & 0 deletions config/300-clustertriggerbinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ kind: CustomResourceDefinition
metadata:
name: clustertriggerbindings.triggers.tekton.dev
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
triggers.tekton.dev/release: "devel"
version: "devel"
spec:
Expand Down
2 changes: 2 additions & 0 deletions config/300-eventlistener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ kind: CustomResourceDefinition
metadata:
name: eventlisteners.triggers.tekton.dev
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
triggers.tekton.dev/release: "devel"
version: "devel"
spec:
Expand Down
2 changes: 2 additions & 0 deletions config/300-triggerbinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ kind: CustomResourceDefinition
metadata:
name: triggerbindings.triggers.tekton.dev
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
triggers.tekton.dev/release: "devel"
version: "devel"
spec:
Expand Down
2 changes: 2 additions & 0 deletions config/300-triggertemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ kind: CustomResourceDefinition
metadata:
name: triggertemplates.triggers.tekton.dev
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
triggers.tekton.dev/release: "devel"
version: "devel"
spec:
Expand Down
12 changes: 12 additions & 0 deletions config/500-webhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ metadata:
name: triggers-webhook-certs
namespace: tekton-pipelines
labels:
app.kubernetes.io/component: webhook
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
triggers.tekton.dev/release: devel
# The data is populated at install time.

Expand All @@ -27,6 +30,9 @@ kind: ValidatingWebhookConfiguration
metadata:
name: validation.webhook.triggers.tekton.dev
labels:
app.kubernetes.io/component: webhook
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
triggers.tekton.dev/release: devel
webhooks:
- admissionReviewVersions:
Expand All @@ -45,6 +51,9 @@ kind: MutatingWebhookConfiguration
metadata:
name: webhook.triggers.tekton.dev
labels:
app.kubernetes.io/component: webhook
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
triggers.tekton.dev/release: devel
webhooks:
- admissionReviewVersions:
Expand All @@ -62,6 +71,9 @@ kind: ValidatingWebhookConfiguration
metadata:
name: config.webhook.triggers.tekton.dev
labels:
app.kubernetes.io/component: webhook
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
triggers.tekton.dev/release: devel
webhooks:
- admissionReviewVersions:
Expand Down
2 changes: 2 additions & 0 deletions config/clusterrole-aggregate-edit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ kind: ClusterRole
metadata:
name: tekton-triggers-aggregate-edit
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
Expand Down
2 changes: 2 additions & 0 deletions config/clusterrole-aggregate-view.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ kind: ClusterRole
metadata:
name: tekton-triggers-aggregate-view
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups:
Expand Down
3 changes: 3 additions & 0 deletions config/config-logging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ kind: ConfigMap
metadata:
name: config-logging-triggers
namespace: tekton-pipelines
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
data:
# Common configuration for all knative codebase
zap-logger-config: |
Expand Down
4 changes: 3 additions & 1 deletion config/config-observability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ kind: ConfigMap
metadata:
name: config-observability-triggers
namespace: tekton-pipelines

labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
data:
_example: |
################################
Expand Down
12 changes: 10 additions & 2 deletions config/controller-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: controller
app.kubernetes.io/component: controller
app.kubernetes.io/instance: default
app.kubernetes.io/version: devel
app.kubernetes.io/part-of: tekton-triggers
triggers.tekton.dev/release: "devel"
app: tekton-triggers-controller
version: "devel"
triggers.tekton.dev/release: "devel"
name: tekton-triggers-controller
namespace: tekton-pipelines
spec:
Expand All @@ -28,4 +33,7 @@ spec:
protocol: TCP
targetPort: 9090
selector:
app: tekton-triggers-controller
app.kubernetes.io/name: controller
app.kubernetes.io/component: controller
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
15 changes: 13 additions & 2 deletions config/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,31 @@ metadata:
name: tekton-triggers-controller
namespace: tekton-pipelines
labels:
app.kubernetes.io/name: tekton-triggers
app.kubernetes.io/name: controller
app.kubernetes.io/component: controller
app.kubernetes.io/instance: default
app.kubernetes.io/version: devel
app.kubernetes.io/part-of: tekton-triggers
# tekton.dev/release value replaced with inputs.params.versionTag in triggers/tekton/publish.yaml
triggers.tekton.dev/release: "devel"
spec:
replicas: 1
selector:
matchLabels:
app: tekton-triggers-controller
app.kubernetes.io/name: controller
app.kubernetes.io/component: controller
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
template:
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
labels:
app.kubernetes.io/name: controller
app.kubernetes.io/component: controller
app.kubernetes.io/instance: default
app.kubernetes.io/version: devel
app.kubernetes.io/part-of: tekton-triggers
app: tekton-triggers-controller
triggers.tekton.dev/release: "devel"
# version value replaced with inputs.params.versionTag in triggers/tekton/publish.yaml
Expand Down
14 changes: 11 additions & 3 deletions config/webhook-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,24 @@
apiVersion: v1
kind: Service
metadata:
name: tekton-triggers-webhook
namespace: tekton-pipelines
labels:
app.kubernetes.io/name: webhook
app.kubernetes.io/component: webhook
app.kubernetes.io/instance: default
app.kubernetes.io/version: devel
app.kubernetes.io/part-of: tekton-triggers
app: tekton-triggers-webhook
version: "devel"
triggers.tekton.dev/release: "devel"
name: tekton-triggers-webhook
namespace: tekton-pipelines
spec:
ports:
- name: https-webhook
port: 443
targetPort: 8443
selector:
app: tekton-triggers-webhook
app.kubernetes.io/name: webhook
app.kubernetes.io/component: webhook
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
20 changes: 14 additions & 6 deletions config/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,35 @@ metadata:
name: tekton-triggers-webhook
namespace: tekton-pipelines
labels:
app.kubernetes.io/name: tekton-triggers
app.kubernetes.io/component: webhook-controller
app.kubernetes.io/name: webhook
app.kubernetes.io/component: webhook
app.kubernetes.io/instance: default
app.kubernetes.io/version: devel
app.kubernetes.io/part-of: tekton-triggers
# tekton.dev/release value replaced with inputs.params.versionTag in triggers/tekton/publish.yaml
triggers.tekton.dev/release: "devel"
spec:
replicas: 1
selector:
matchLabels:
app: tekton-triggers-webhook
app.kubernetes.io/name: webhook
app.kubernetes.io/component: webhook
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-triggers
template:
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
labels:
app.kubernetes.io/name: webhook
app.kubernetes.io/component: webhook
app.kubernetes.io/instance: default
app.kubernetes.io/version: devel
app.kubernetes.io/part-of: tekton-triggers
app: tekton-triggers-webhook
triggers.tekton.dev/release: "devel"
# version value replaced with inputs.params.versionTag in triggers/tekton/publish.yaml
version: "devel"
role: webhook
app.kubernetes.io/name: tekton-triggers
app.kubernetes.io/component: webhook-controller
spec:
serviceAccountName: tekton-triggers-controller
containers:
Expand Down

0 comments on commit 4060450

Please sign in to comment.