Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2021 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: operator.tekton.dev/v1alpha1
kind: TektonInstallerSet
metadata:
name: foo
spec:
manifests: []
1 change: 1 addition & 0 deletions config/crs/kubernetes/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ resources:
- pipeline/operator_v1alpha1_pipeline_cr.yaml
- trigger/operator_v1alpha1_trigger_cr.yaml
- config/all/operator_v1alpha1_config_cr.yaml
- installerset/operator_v1alpha1_installerset_cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2021 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: operator.tekton.dev/v1alpha1
kind: TektonInstallerSet
metadata:
name: foo
spec:
manifests: []
1 change: 1 addition & 0 deletions config/crs/openshift/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ resources:
- config/all/operator_v1alpha1_config_cr.yaml
- pipeline/operator_v1alpha1_pipeline_cr.yaml
- trigger/operator_v1alpha1_trigger_cr.yaml
- installerset/operator_v1alpha1_installerset_cr.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
2 changes: 1 addition & 1 deletion operatorhub/kubernetes/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to generate Operator Bundles for OpenShift
# How to generate Operator Bundles for Kubernetes

For Kubernetes Platform ([operatorhub.io](https://operatorhub.io)) release we generate the
bundle for using `release-manifest` strategy.
Expand Down
29 changes: 28 additions & 1 deletion operatorhub/openshift/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# How to generate Operator Bundles for OpenShift

`TBD`
For OpenShift Platform release we generate the
bundle for using `local` strategy.

## Steps to generate bundles from an existing release.yaml

**Note:** The input release.yaml could be a github release or the result of `ko resolve config`

1. From the project root (tektoncd/operator) run

```bash
OPERATOR_RELEASE_VERSION=x.y.z
PREVIOUS_OPERATOR_RELEASE_VERSION=a.b.c
export BUNDLE_ARGS="--workspace operatorhub/openshift --operator-release-version ${OPERATOR_RELEASE_VERSION} --channels stable,preview --default-channel stable --fetch-strategy-local --upgrade-strategy-replaces --operator-release-previous-version ${PREVIOUS_OPERATOR_RELEASE_VERSION}"
make operator-bundle
```

**CLI flags explained**

Flag | Description
--------------------------------------------- | -----------
`--workspace operatorhub/openshift` | the working directory where the operator bundle should be assembled
`--operator-release-version 1.6.0` | version of the release (version of bundle)
`--channels stable,preview` | target release channel(s) (eg: stable,preview)
`--default-channel stable` | set default channel of the operator
`--fetch-strategy-local` | gather input resources definitions from a local yaml files
`--upgrade-strategy-replaces` | specify update strategy (use `replaces` or `semver`)
`--operator-release-previous-version 1.5.0` | version of the previous operator release that will be replaced by the bundle being built
````
2 changes: 1 addition & 1 deletion operatorhub/openshift/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ image-substitutions:
- deploymentName: tekton-operator-webhook
containerName: tekton-operator-webhook

# add thrid party images which are not replaced by operator
# add thrid party images which are not replaced by operator
# but pulled directly by tasks here
defaultRelatedImages: []
#- image: "" ##<imagename>:<tag> or <imagename>@<sha>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ metadata:
capabilities: Seamless Upgrades
categories: Developer Tools, Integration & Delivery
certified: "false"
containerImage: registry.redhat.io/openshift-pipelines/pipelines-rhel8-operator@sha256:782e1fbb7c81effe0cae9133c6d13ddc62e6156533c5037193ae730d630c028a
description: Red Hat OpenShift Pipelines is a cloud-native CI/CD solution for building pipelines using Tekton concepts which run natively on OpenShift and Kubernetes.
operators.operatorframework.io/builder: operator-sdk-v1.7.2
operators.operatorframework.io/internal-objects: '["tektonconfig.operator.tekton.dev",,"tektonpipeline.operator.tekton.dev","tektontrigger.operator.tekton.dev","tektonaddon.operator.tekton.dev"]'
operators.openshift.io/infrastructure-features: '["disconnected","proxy-aware"]'
operators.operatorframework.io/internal-objects: '["tektoninstallersets.operator.tekton.dev", "tektonconfigs.operator.tekton.dev","tektonpipelines.operator.tekton.dev","tektontriggers.operator.tekton.dev","tektonaddons.operator.tekton.dev"]'
repository: https://github.com/openshift/tektoncd-operator
support: Red Hat
labels:
Expand All @@ -22,27 +22,20 @@ spec:
apiservicedefinitions: {}
customresourcedefinitions:
owned:
- description: Represents an installation of latest version of Addons (exclusively ClusterTasks, consoleyamlsamples, consoleclidownloads and consolequickstarts)
displayName: Tekton Addons
kind: TektonAddon
name: tektonaddons.operator.tekton.dev
specDescriptors:
- description: Namespace where Addons installed
displayName: Target Namespace
path: targetNamespace
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:label
statusDescriptors:
- description: The version of Addons installed
displayName: Version
path: version
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:label
version: v1alpha1
- description: Represents an installation of latest version of Tekton components, TektonPipeline, TektonTrigger and TektonAddon
displayName: Tekton Configuration
kind: TektonConfig
name: tektonconfigs.operator.tekton.dev
resources:
- kind: tektonpipelines
name: 'pipeline'
version: v1alpha1
- kind: tektontriggers
name: 'trigger'
version: v1alpha1
- kind: tektonaddons
name: 'addon'
version: v1alpha1
specDescriptors:
- description: Namespace where Tekton components are installed
displayName: Target Namespace
Expand All @@ -65,6 +58,10 @@ spec:
displayName: Tekton Pipelines
kind: TektonPipeline
name: tektonpipelines.operator.tekton.dev
resources:
- kind: tektoninstallersets
name: ''
version: v1alpha1
specDescriptors:
- description: Namespace where Tekton Pipelines installed
displayName: Target Namespace
Expand All @@ -82,6 +79,10 @@ spec:
displayName: Tekton Triggers
kind: TektonTrigger
name: tektontriggers.operator.tekton.dev
resources:
- kind: tektoninstallersets
name: ''
version: v1alpha1
specDescriptors:
- description: Namespace where Tekton Triggers installed
displayName: Target Namespace
Expand All @@ -95,6 +96,78 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:label
version: v1alpha1
- description: Represents an installation of latest version of Addons (exclusively ClusterTasks, consoleyamlsamples, consoleclidownloads and consolequickstarts)
displayName: Tekton Addons
kind: TektonAddon
name: tektonaddons.operator.tekton.dev
resources:
- kind: tektoninstallersets
name: ''
version: v1alpha1
specDescriptors:
- description: Namespace where Addons installed
displayName: Target Namespace
path: targetNamespace
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:label
statusDescriptors:
- description: The version of Addons installed
displayName: Version
path: version
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:label
version: v1alpha1
- description: This CustomResourceDefinition (CRD) is used internally by the other OpenShift Pipelines CRDs to maintain the lifecycle of OpenShift Pipelines Components
displayName: Tekton Installer Set
kind: TektonInstallerSet
name: tektoninstallersets.operator.tekton.dev
resources:
- kind: clusterroles
name: ''
version: v1
- kind: customresourcedefinitions
name: ''
version: v1beta1
- kind: deployments
name: ''
version: v1beta1
- kind: podsecuritypolicies
name: ''
version: v1beta1
- kind: clusterrolebindings
name: ''
version: v1beta1
- kind: services
name: ''
version: v1
- kind: pods
name: ''
version: v1
- kind: configmaps
name: ''
version: v1
- kind: config
name: ''
version: v1alpha1
- kind: namespaces
name: ''
version: v1
- kind: serviceaccounts
name: ''
version: v1
specDescriptors:
- description: List of OpenShift API resources managed by this InstallerSet
displayName: Manifests
path: manifests
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:label
statusDescriptors:
- description: The version of Operator installed
displayName: ObservedGeneration
path: observedGeneration
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:label
version: v1alpha1
description: |
Red Hat OpenShift Pipelines is a cloud-native continuous integration and delivery
(CI/CD) solution for building pipelines using [Tekton](https://tekton.dev).
Expand All @@ -103,6 +176,7 @@ spec:
serverless, VMs, etc) by abstracting away the underlying details.

## Features

* Standard CI/CD pipelines definition
* Build images with Kubernetes tools such as S2I, Buildah, Buildpacks, Kaniko, etc
* Deploy applications to multiple platforms such as Kubernetes, serverless and VMs
Expand All @@ -113,13 +187,18 @@ spec:
* Integrated with OpenShift Developer Console

## Installation

_Red Hat OpenShift Pipelines Operator_ gets installed into a single namespace (openshift-operators) which would then install _Red Hat OpenShift Pipelines_ into the openshift-pipelines namespace. _Red Hat OpenShift Pipelines_ is however cluster-wide and can run pipelines created in any namespace.

### Components
- Tekton Pipelines: v0.22.0
- Tekton Triggers: v0.12.1
- ClusterTasks based on Tekton Catalog 0.22

- Tekton Pipelines: v0.28.0
- Tekton Triggers: v0.16.0
- ClusterTasks based on Tekton Catalog 0.28

## Getting Started
In order to get familiar with _OpenShift Pipelines_ concepts and create your first pipeline, follow the [OpenShift Pipelines Docs](https://docs.openshift.com/container-platform/latest/pipelines/creating-applications-with-cicd-pipelines.html).

## CLI (tkn)
Tekton Pipelines cli project provides a CLI (tkn) for interacting with OpenShift Pipelines.
- [Download tkn for Linux](https://mirror.openshift.com/pub/openshift-v4/clients/pipeline/0.17.2/tkn-linux-amd64-0.17.2.tar.gz)
Expand Down
21 changes: 21 additions & 0 deletions operatorhub/openshift/release-artifacts/bundle.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM scratch

# Core bundle labels.
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=openshift-pipelines-operator-rh
LABEL operators.operatorframework.io.bundle.channels.v1=stable,preview
LABEL operators.operatorframework.io.bundle.channel.default.v1=stable
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.7.1+git
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=unknown

# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/

# Copy files to locations specified by labels.
COPY bundle/manifests /manifests/
COPY bundle/metadata /metadata/
COPY bundle/tests/scorecard /tests/scorecard/
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
apiVersion: v1
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.

# Common configuration for all Knative codebase
zap-logger-config: |
{
"level": "info",
"development": false,
"outputPaths": ["stdout"],
"errorOutputPaths": ["stderr"],
"encoding": "json",
"encoderConfig": {
"timeKey": "ts",
"levelKey": "level",
"nameKey": "logger",
"callerKey": "caller",
"messageKey": "msg",
"stacktraceKey": "stacktrace",
"lineEnding": "",
"levelEncoder": "",
"timeEncoder": "iso8601",
"durationEncoder": "",
"callerEncoder": ""
}
}
loglevel.controller: info
loglevel.webhook: info
zap-logger-config: |
{
"level": "debug",
"development": true,
"sampling": {
"initial": 100,
"thereafter": 100
},
"outputPaths": ["stdout"],
"errorOutputPaths": ["stderr"],
"encoding": "json",
"encoderConfig": {
"timeKey": "",
"levelKey": "level",
"nameKey": "logger",
"callerKey": "caller",
"messageKey": "msg",
"stacktraceKey": "stacktrace",
"lineEnding": "",
"levelEncoder": "",
"timeEncoder": "",
"durationEncoder": "",
"callerEncoder": ""
}
}
kind: ConfigMap
metadata:
labels:
operator.tekton.dev/release: devel
name: config-logging
Loading