Skip to content

Commit

Permalink
feat: amend makefile to correctly insert ns
Browse files Browse the repository at this point in the history
  • Loading branch information
mentlak0 committed Jun 1, 2023
1 parent 830c801 commit 7103536
Show file tree
Hide file tree
Showing 57 changed files with 294 additions and 396 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ endif
jx gitops rename -d ${CHART_DIR}/templates
# Remove tekton-pipelines-resolvers-ns
rm -r charts/tekton-pipeline/templates/tekton-pipelines-resolvers-ns.yaml
# Amend tekton-resolver-ns
yq -i '.subjects[].namespace = "tekton-pipelines"' charts/tekton-pipeline/templates/tekton-pipelines-resolvers-namespace-rbac-rb.yaml
yq -i '.subjects[].namespace = "tekton-pipelines"' charts/tekton-pipeline/templates/tekton-pipelines-resolvers-crb.yaml
# Remove namespace from metadata to force with helm install
yq -i eval 'del(.metadata.namespace)' charts/tekton-pipeline/templates/*
# move content of data: from feature-slags-cm.yaml to featureFlags: in values.yaml
Expand All @@ -28,9 +31,6 @@ endif
yq -i '.controller.deployment.image = load("$(CHART_DIR)/templates/tekton-pipelines-controller-deploy.yaml").spec.template.spec.containers[].image' $(CHART_DIR)/values.yaml
# Remove the image value, so that end users can customize the image
yq -i '.spec.template.spec.containers[].image = null' charts/tekton-pipeline/templates/tekton-pipelines-controller-deploy.yaml
# Amend tekton-resolver-ns
yq -i '.subjects[].namespace = "tekton-pipelines"' charts/tekton-pipeline/templates/tekton-pipelines-resolvers-namespace-rbac-rb.yaml
yq -i '.subjects[].namespace = "tekton-pipelines"' charts/tekton-pipeline/templates/tekton-pipelines-resolvers-crb.yaml
# kustomize the resources to include some helm template blocs
kustomize build ${CHART_DIR} | sed '/helmTemplateRemoveMe/d' > ${CHART_DIR}/templates/resource.yaml
jx gitops split -d ${CHART_DIR}/templates
Expand Down
2 changes: 1 addition & 1 deletion charts/tekton-pipeline/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
description: A Helm chart for Tekton Pipelines
name: tekton-pipeline
version: 0.6.0
appVersion: 0.36.1
appVersion: 0.42.0
icon: https://avatars2.githubusercontent.com/u/47602533
home: https://github.com/cdfoundation/tekton-helm-chart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: bundleresolver-config
namespace: tekton-pipelines-resolvers
labels:
app.kubernetes.io/component: resolvers
app.kubernetes.io/instance: default
Expand All @@ -25,4 +24,4 @@ data:
# the default service account name to use for bundle requests.
default-service-account: "default"
# The default layer kind in the bundle image.
default-kind: "task"
default-kind: "task"
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: cluster-resolver-config
namespace: tekton-pipelines-resolvers
labels:
app.kubernetes.io/component: resolvers
app.kubernetes.io/instance: default
Expand All @@ -29,4 +28,4 @@ data:
# An optional comma-separated list of namespaces which the resolver is allowed to access. Defaults to empty, meaning all namespaces are allowed.
allowed-namespaces: ""
# An optional comma-separated list of namespaces which the resolver is blocked from accessing. Defaults to empty, meaning all namespaces are allowed.
blocked-namespaces: ""
blocked-namespaces: ""
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ spec:
clientConfig:
service:
name: tekton-pipelines-webhook
namespace: tekton-pipelines
namespace: tekton-pipelines
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: config-artifact-bucket
namespace: tekton-pipelines
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-pipelines
Expand All @@ -30,4 +29,4 @@ metadata:
# bucket.service.account.secret.key:
# # The field name that should be used for the service account
# # Valid values: GOOGLE_APPLICATION_CREDENTIALS, BOTO_CONFIG.
# bucket.service.account.field.name: GOOGLE_APPLICATION_CREDENTIALS
# bucket.service.account.field.name: GOOGLE_APPLICATION_CREDENTIALS
3 changes: 1 addition & 2 deletions charts/tekton-pipeline/templates/config-artifact-pvc-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: config-artifact-pvc
namespace: tekton-pipelines
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-pipelines
Expand All @@ -25,4 +24,4 @@ metadata:
# size: 5Gi
#
# # storage class of the PVC volume
# storageClassName: storage-class-name
# storageClassName: storage-class-name
21 changes: 4 additions & 17 deletions charts/tekton-pipeline/templates/config-defaults-cm.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
# Copyright 2019 The Tekton Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
data:
{{- toYaml .Values.configDefaults | nindent 2 }}
kind: ConfigMap
metadata:
name: config-defaults
namespace: tekton-pipelines
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-pipelines
data: null
name: config-defaults
namespace: tekton-pipelines
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: config-leader-election
namespace: tekton-pipelines
labels:
app.kubernetes.io/component: resolvers
app.kubernetes.io/instance: default
Expand Down Expand Up @@ -50,4 +49,4 @@ data:
# is N, the N replicas will compete for the M buckets. The owner of a
# bucket will take care of the reconciling for the keys partitioned into
# that bucket.
buckets: "1"
buckets: "1"
3 changes: 1 addition & 2 deletions charts/tekton-pipeline/templates/config-logging-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: config-logging
namespace: tekton-pipelines
labels:
app.kubernetes.io/component: resolvers
app.kubernetes.io/instance: default
Expand Down Expand Up @@ -49,4 +48,4 @@ data:
}
# Log level overrides
loglevel.controller: "info"
loglevel.webhook: "info"
loglevel.webhook: "info"
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: config-observability
namespace: tekton-pipelines
labels:
app.kubernetes.io/component: resolvers
app.kubernetes.io/instance: default
Expand Down Expand Up @@ -58,4 +57,4 @@ data:
# metrics are not supported by "knative_revision" resource type. Setting this
# flag to "true" could cause extra Stackdriver charge.
# If metrics.backend-destination is not Stackdriver, this is ignored.
metrics.allow-stackdriver-custom-metrics: "false"
metrics.allow-stackdriver-custom-metrics: "false"
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: config-registry-cert
namespace: tekton-pipelines
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-pipelines
# data:
# # Registry's self-signed certificate
# cert: |
# cert: |
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: config-trusted-resources
namespace: tekton-pipelines
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-pipelines
Expand All @@ -38,4 +37,4 @@ data:
# publickeys specifies the list of public keys, the paths are separated by comma
# publickeys: "/etc/verification-secrets/cosign.pub,
# gcpkms://projects/tekton/locations/us/keyRings/trusted-resources/cryptoKeys/trusted-resources"
# gcpkms://projects/tekton/locations/us/keyRings/trusted-resources/cryptoKeys/trusted-resources"
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ webhooks:
name: config.webhook.pipeline.tekton.dev
objectSelector:
matchLabels:
app.kubernetes.io/part-of: tekton-pipelines
app.kubernetes.io/part-of: tekton-pipelines
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ spec:
categories:
- tekton
- tekton-pipelines
scope: Namespaced
scope: Namespaced
21 changes: 4 additions & 17 deletions charts/tekton-pipeline/templates/feature-flags-cm.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
# Copyright 2019 The Tekton Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
data:
{{- toYaml .Values.featureFlags | nindent 2 }}
kind: ConfigMap
metadata:
name: feature-flags
namespace: tekton-pipelines
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-pipelines
data: null
name: feature-flags
namespace: tekton-pipelines
3 changes: 1 addition & 2 deletions charts/tekton-pipeline/templates/git-resolver-config-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: git-resolver-config
namespace: tekton-pipelines-resolvers
labels:
app.kubernetes.io/component: resolvers
app.kubernetes.io/instance: default
Expand All @@ -40,4 +39,4 @@ data:
api-token-secret-namespace: "default"
# The default organization to look for repositories under when using the authenticated API,
# if not specified in the resolver parameters. Optional.
default-org: ""
default-org: ""
3 changes: 1 addition & 2 deletions charts/tekton-pipeline/templates/hubresolver-config-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: hubresolver-config
namespace: tekton-pipelines-resolvers
labels:
app.kubernetes.io/component: resolvers
app.kubernetes.io/instance: default
Expand All @@ -31,4 +30,4 @@ data:
# the default layer kind in the hub image.
default-kind: "task"
# the default hub source to pull the resource from.
default-type: "artifact"
default-type: "artifact"
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ spec:
categories:
- tekton
- tekton-pipelines
scope: Namespaced
scope: Namespaced
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ spec:
clientConfig:
service:
name: tekton-pipelines-webhook
namespace: tekton-pipelines
namespace: tekton-pipelines
3 changes: 1 addition & 2 deletions charts/tekton-pipeline/templates/pipelines-info-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: pipelines-info
namespace: tekton-pipelines
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-pipelines
Expand All @@ -26,4 +25,4 @@ data:
# this ConfigMap such that even if we don't have access to
# other resources in the namespace we still can have access to
# this ConfigMap.
version: "v0.42.0"
version: "v0.42.0"
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ spec:
clientConfig:
service:
name: tekton-pipelines-webhook
namespace: tekton-pipelines
namespace: tekton-pipelines
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ spec:
clientConfig:
service:
name: tekton-pipelines-webhook
namespace: tekton-pipelines
namespace: tekton-pipelines
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: resolvers-feature-flags
namespace: tekton-pipelines-resolvers
labels:
app.kubernetes.io/component: resolvers
app.kubernetes.io/instance: default
Expand All @@ -29,4 +28,4 @@ data:
# Setting this flag to "true" enables remote resolution of tasks and pipelines from Git repositories.
enable-git-resolver: "true"
# Setting this flag to "true" enables remote resolution of tasks and pipelines from other namespaces within the cluster.
enable-cluster-resolver: "true"
enable-cluster-resolver: "true"
2 changes: 1 addition & 1 deletion charts/tekton-pipeline/templates/runs.tekton.dev-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ spec:
categories:
- tekton
- tekton-pipelines
scope: Namespaced
scope: Namespaced
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ spec:
clientConfig:
service:
name: tekton-pipelines-webhook
namespace: tekton-pipelines
namespace: tekton-pipelines
2 changes: 1 addition & 1 deletion charts/tekton-pipeline/templates/tasks.tekton.dev-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ spec:
clientConfig:
service:
name: tekton-pipelines-webhook
namespace: tekton-pipelines
namespace: tekton-pipelines
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ rules:
- list
- patch
- update
- watch
- watch
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ rules:
verbs:
- get
- list
- watch
- watch
Loading

0 comments on commit 7103536

Please sign in to comment.