-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
manage pipeline console plugin deployment on openshift
Signed-off-by: Jeeva Kandasamy <[email protected]>
- Loading branch information
Showing
12 changed files
with
786 additions
and
15 deletions.
There are no files selected for viewing
140 changes: 140 additions & 0 deletions
140
...shift/operator/kodata/static/tekton-results/00-postreconcile/pipeline_console_plugin.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,140 @@ | ||
# Copyright 2023 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. | ||
|
||
# to know about dynamic plugin visit, | ||
# https://github.com/openshift/enhancements/blob/master/enhancements/console/dynamic-plugins.md | ||
|
||
# service to access static contents: js, CSS, HTML. etc., | ||
# this service creates and manages secret called "pipeline-console-plugin-cert" | ||
# generated secret will be used in the console plugin container (nginx + static content) | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: pipeline-console-plugin | ||
namespace: openshift-pipelines | ||
annotations: | ||
# https://docs.openshift.com/container-platform/4.13/security/certificates/service-serving-certificate.html | ||
service.beta.openshift.io/serving-cert-secret-name: pipeline-console-plugin-cert | ||
labels: | ||
app.kubernetes.io/part-of: tektoncd-results | ||
spec: | ||
ports: | ||
- name: 8443-tcp | ||
protocol: TCP | ||
port: 8443 | ||
targetPort: 8443 | ||
selector: | ||
name: pipeline-console-plugin | ||
app: pipeline-console-plugin | ||
|
||
# nginx configuration | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: pipeline-console-plugin | ||
namespace: openshift-pipelines | ||
labels: | ||
app.kubernetes.io/part-of: tektoncd-results | ||
data: | ||
nginx.conf: | | ||
error_log /dev/stdout warn; | ||
events {} | ||
http { | ||
access_log /dev/stdout; | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
keepalive_timeout 65; | ||
server { | ||
listen 8443 ssl; | ||
listen [::]:8443 ssl; | ||
ssl_certificate /var/cert/tls.crt; | ||
ssl_certificate_key /var/cert/tls.key; | ||
root /usr/share/nginx/html; | ||
} | ||
} | ||
# nginx + pipeline dynamic console custom static contents | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: pipeline-console-plugin | ||
namespace: openshift-pipelines | ||
labels: | ||
app.kubernetes.io/part-of: tektoncd-results | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
name: pipeline-console-plugin | ||
app: pipeline-console-plugin | ||
template: | ||
metadata: | ||
labels: | ||
name: pipeline-console-plugin | ||
app: pipeline-console-plugin | ||
app.kubernetes.io/part-of: tektoncd-results | ||
spec: | ||
securityContext: | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
volumes: | ||
- name: pipeline-console-plugin-cert | ||
secret: | ||
secretName: pipeline-console-plugin-cert | ||
defaultMode: 420 | ||
- name: nginx-conf | ||
configMap: | ||
name: pipeline-console-plugin | ||
defaultMode: 420 | ||
containers: | ||
- name: pipeline-console-plugin | ||
image: ghcr.io/openshift-pipelines/console-plugin:main | ||
imagePullPolicy: Always | ||
ports: | ||
- protocol: TCP | ||
containerPort: 8443 | ||
volumeMounts: | ||
- name: pipeline-console-plugin-cert | ||
readOnly: true | ||
mountPath: /var/cert | ||
- name: nginx-conf | ||
readOnly: true | ||
mountPath: /etc/nginx/nginx.conf | ||
subPath: nginx.conf | ||
|
||
# Console plugin is a cluster wide resource | ||
# updates pipeline dynamic content provider service details | ||
--- | ||
apiVersion: console.openshift.io/v1 | ||
kind: ConsolePlugin | ||
metadata: | ||
name: pipeline-console-plugin | ||
labels: | ||
app.kubernetes.io/part-of: tektoncd-results | ||
spec: | ||
displayName: Pipeline Console Plugin | ||
backend: | ||
type: Service | ||
service: | ||
name: pipeline-console-plugin | ||
namespace: openshift-pipelines | ||
port: 8443 | ||
basePath: "/" | ||
proxy: | ||
i18n: | ||
loadType: Preload # options: Preload, Lazy |
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
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.