-
Notifications
You must be signed in to change notification settings - Fork 238
Configure Bundle Generation for Openshift #418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tekton-robot
merged 1 commit into
tektoncd:main
from
nikhil-thomas:add/bundle-gen-config/openshift
Sep 23, 2021
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
config/crs/kubernetes/installerset/operator_v1alpha1_installerset_cr.yaml
This file contains hidden or 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,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: [] |
This file contains hidden or 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
20 changes: 20 additions & 0 deletions
20
config/crs/openshift/installerset/operator_v1alpha1_installerset_cr.yaml
This file contains hidden or 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,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: [] |
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -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 | ||
| ```` |
This file contains hidden or 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 hidden or 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 hidden or 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,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/ |
72 changes: 72 additions & 0 deletions
72
operatorhub/openshift/release-artifacts/bundle/manifests/config-logging_v1_configmap.yaml
This file contains hidden or 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,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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.