-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the remote resolvers deployment to a separate namespace
In https://github.com/tektoncd/community/blob/main/teps/0060-remote-resource-resolution.md#3-create-a-new-tekton-resolution-project, we say: ``` Webhook and controller deployments for ResolutionRequest objects will run in the tekton-remote-resolution namespace by default. The namespace is intentionally separate from tekton-pipelines to allow RBAC that isolates the remote resolution machinery. ``` While the actual `ResolutionRequest` reconciler/webhooks/etc are now part of the core Pipeline controller/webhook deployments, the actual resolvers (i.e., `git`, `hub`, `bundles`) should probably still be moved to a separate namespace from `tekton-pipelines` to properly isolate the actual resolver executions. So let's do that. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
- Loading branch information
Showing
40 changed files
with
810 additions
and
128 deletions.
There are no files selected for viewing
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
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,22 @@ | ||
# Copyright 2022 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 | ||
# | ||
# http://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 | ||
kind: Namespace | ||
metadata: | ||
name: tekton-pipelines-resolvers | ||
labels: | ||
app.kubernetes.io/component: resolvers | ||
app.kubernetes.io/instance: default | ||
app.kubernetes.io/part-of: tekton-pipelines |
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
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
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
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
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
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,36 @@ | ||
# 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 | ||
kind: ConfigMap | ||
metadata: | ||
name: resolvers-feature-flags | ||
namespace: tekton-pipelines-resolvers | ||
labels: | ||
app.kubernetes.io/component: resolvers | ||
app.kubernetes.io/instance: default | ||
app.kubernetes.io/part-of: tekton-pipelines | ||
data: | ||
# Setting this flag to "true" enables remote resolution of Tekton OCI bundles. | ||
# This is an experimental feature and thus should still be considered | ||
# an alpha feature. | ||
enable-bundles-resolver: "true" | ||
# Setting this flag to "true" enables remote resolution of tasks and pipelines via the Tekton Hub. | ||
# This is an experimental feature and thus should still be considered | ||
# an alpha feature. | ||
enable-hub-resolver: "true" | ||
# Setting this flag to "true" enables remote resolution of tasks and pipelines from Git repositories. | ||
# This is an experimental feature and thus should still be considered | ||
# an alpha feature. | ||
enable-git-resolver: "true" |
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,53 @@ | ||
# Copyright 2020 Tekton Authors LLC | ||
# | ||
# 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 | ||
kind: ConfigMap | ||
metadata: | ||
name: config-leader-election | ||
namespace: tekton-pipelines-resolvers | ||
labels: | ||
app.kubernetes.io/component: resolvers | ||
app.kubernetes.io/instance: default | ||
app.kubernetes.io/part-of: tekton-pipelines | ||
data: | ||
_example: | | ||
################################ | ||
# # | ||
# EXAMPLE CONFIGURATION # | ||
# # | ||
################################ | ||
# This block is not actually functional configuration, | ||
# but serves to illustrate the available configuration | ||
# options and document them in a way that is accessible | ||
# to users that `kubectl edit` this config map. | ||
# | ||
# These sample configuration options may be copied out of | ||
# this example block and unindented to be in the data block | ||
# to actually change the configuration. | ||
# lease-duration is how long non-leaders will wait to try to acquire the | ||
# lock; 15 seconds is the value used by core kubernetes controllers. | ||
lease-duration: "60s" | ||
# renew-deadline is how long a leader will try to renew the lease before | ||
# giving up; 10 seconds is the value used by core kubernetes controllers. | ||
renew-deadline: "40s" | ||
# retry-period is how long the leader election client waits between tries of | ||
# actions; 2 seconds is the value used by core kubernetes controllers. | ||
retry-period: "10s" | ||
# buckets is the number of buckets used to partition key space of each | ||
# Reconciler. If this number is M and the replica number of the controller | ||
# 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" |
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,53 @@ | ||
# Copyright 2019 Tekton Authors LLC | ||
# | ||
# 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 | ||
kind: ConfigMap | ||
metadata: | ||
name: config-logging | ||
namespace: tekton-pipelines-resolvers | ||
labels: | ||
app.kubernetes.io/component: resolvers | ||
app.kubernetes.io/instance: default | ||
app.kubernetes.io/part-of: tekton-pipelines | ||
data: | ||
zap-logger-config: | | ||
{ | ||
"level": "info", | ||
"development": false, | ||
"sampling": { | ||
"initial": 100, | ||
"thereafter": 100 | ||
}, | ||
"outputPaths": ["stdout"], | ||
"errorOutputPaths": ["stderr"], | ||
"encoding": "json", | ||
"encoderConfig": { | ||
"timeKey": "timestamp", | ||
"levelKey": "severity", | ||
"nameKey": "logger", | ||
"callerKey": "caller", | ||
"messageKey": "message", | ||
"stacktraceKey": "stacktrace", | ||
"lineEnding": "", | ||
"levelEncoder": "", | ||
"timeEncoder": "iso8601", | ||
"durationEncoder": "", | ||
"callerEncoder": "" | ||
} | ||
} | ||
# Log level overrides | ||
loglevel.controller: "info" | ||
loglevel.webhook: "info" |
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,91 @@ | ||
# Copyright 2022 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 | ||
kind: ConfigMap | ||
metadata: | ||
name: config-observability | ||
namespace: tekton-pipelines-resolvers | ||
labels: | ||
app.kubernetes.io/component: resolvers | ||
app.kubernetes.io/instance: default | ||
app.kubernetes.io/part-of: tekton-pipelines | ||
|
||
data: | ||
_example: | | ||
################################ | ||
# # | ||
# EXAMPLE CONFIGURATION # | ||
# # | ||
################################ | ||
# This block is not actually functional configuration, | ||
# but serves to illustrate the available configuration | ||
# options and document them in a way that is accessible | ||
# to users that `kubectl edit` this config map. | ||
# | ||
# These sample configuration options may be copied out of | ||
# this example block and unindented to be in the data block | ||
# to actually change the configuration. | ||
# If non-empty, this enables queue proxy writing request logs to stdout. | ||
# The value determines the shape of the request logs and it must be a valid go text/template. | ||
# It is important to keep this as a single line. Multiple lines are parsed as separate entities | ||
# by most collection agents and will split the request logs into multiple records. | ||
# | ||
# The following fields and functions are available to the template: | ||
# | ||
# Request: An http.Request (see https://golang.org/pkg/net/http/#Request) | ||
# representing an HTTP request received by the server. | ||
# | ||
# Response: | ||
# struct { | ||
# Code int // HTTP status code (see https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) | ||
# Size int // An int representing the size of the response. | ||
# Latency float64 // A float64 representing the latency of the response in seconds. | ||
# } | ||
# | ||
# Revision: | ||
# struct { | ||
# Name string // Knative revision name | ||
# Namespace string // Knative revision namespace | ||
# Service string // Knative service name | ||
# Configuration string // Knative configuration name | ||
# PodName string // Name of the pod hosting the revision | ||
# PodIP string // IP of the pod hosting the revision | ||
# } | ||
# | ||
logging.request-log-template: '{"httpRequest": {"requestMethod": "{{.Request.Method}}", "requestUrl": "{{js .Request.RequestURI}}", "requestSize": "{{.Request.ContentLength}}", "status": {{.Response.Code}}, "responseSize": "{{.Response.Size}}", "userAgent": "{{js .Request.UserAgent}}", "remoteIp": "{{js .Request.RemoteAddr}}", "serverIp": "{{.Revision.PodIP}}", "referer": "{{js .Request.Referer}}", "latency": "{{.Response.Latency}}s", "protocol": "{{.Request.Proto}}"}, "traceId": "{{index .Request.Header "X-B3-Traceid"}}"}' | ||
# metrics.backend-destination field specifies the system metrics destination. | ||
# It supports either prometheus (the default) or stackdriver. | ||
# Note: Using stackdriver will incur additional charges | ||
metrics.backend-destination: prometheus | ||
# metrics.request-metrics-backend-destination specifies the request metrics | ||
# destination. If non-empty, it enables queue proxy to send request metrics. | ||
# Currently supported values: prometheus, stackdriver. | ||
metrics.request-metrics-backend-destination: prometheus | ||
# metrics.stackdriver-project-id field specifies the stackdriver project ID. This | ||
# field is optional. When running on GCE, application default credentials will be | ||
# used if this field is not provided. | ||
metrics.stackdriver-project-id: "<your stackdriver project id>" | ||
# metrics.allow-stackdriver-custom-metrics indicates whether it is allowed to send metrics to | ||
# Stackdriver using "global" resource type and custom metric type if the | ||
# 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" |
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
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
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
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
Oops, something went wrong.