Skip to content

Sync w/ upstream: operator-lifecycle-manager #213

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
merged 35 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e02906a
fix(og): Fix missing MultiOperatorGroups condition in some cases (#2305)
dinhxuanvu Aug 2, 2021
011db68
Makefile: Add a linting target that runs gofmt/goimports
timflannagan Sep 8, 2021
b33b6b5
.github/workflows: Introduce a sanity check that runs static linting/…
timflannagan Sep 8, 2021
5c83827
pkg,test: Fix linting violations in relevant packages
timflannagan Sep 8, 2021
afa6ef4
Update the CONTRIBUTING.md guidelines (#2344)
timflannagan Sep 13, 2021
eb55029
.github/workflows: Bump the docker/build-push-action to the v2 version
timflannagan Sep 10, 2021
9674465
fail gracefully when client-ca file is not set or doesn't exist (#2358)
sjenning Sep 15, 2021
cb3b165
.github/workflows: Don't run the sanity jobs for markdown-only update…
timflannagan Sep 16, 2021
25fb265
Makefile,test: Remove the test/rh-operators directory (#2354)
timflannagan Sep 20, 2021
336f02e
Add summary and description for prometheus alerts (#2361)
tylerslaton Sep 21, 2021
fb8b572
test/e2e: Remove the unused e2e.sh and tap.jq files (#2366)
timflannagan Sep 21, 2021
1023034
Add olm-managed label to configmap-based catalogsource for e2e test (…
dinhxuanvu Sep 22, 2021
064c435
pkg/controller: Fix panic when creating cluster-scoped RBAC in OG con…
timflannagan Sep 23, 2021
e37e7d6
Update default catalog namespace (#2371)
kevinrizza Sep 23, 2021
295c1dc
Integrate goreleaser to produce draft releases when new tags are push…
timflannagan Sep 24, 2021
9941e12
Makefile: Update the e2e target to use ginkgo (#2367)
timflannagan Oct 1, 2021
09bc475
test(e2e): use server-side apply to update fixture (#2385)
njhale Oct 1, 2021
5cfd98e
fix: wrap subscription e2e test logic in Eventually statement (#2392)
exdx Oct 4, 2021
26182b4
fix(e2e): Using Eventually to check subscription state (#2396)
dinhxuanvu Oct 5, 2021
fb8b0f4
fix(e2e): Remove the PreExistingCRDOwnerIsReplaced e2e test case (#2388)
dinhxuanvu Oct 5, 2021
2f2caa4
Rename resolver/cache.Operator to Entry. (#2359)
benluddy Oct 5, 2021
baea59c
chore(make): add e2e test options (#2393)
njhale Oct 6, 2021
5d23751
test/e2e: Wrap flake-prone garbage collection tests in eventually ass…
timflannagan Oct 6, 2021
2248662
fix: wrap csv e2e test create in Eventually statements in the BeforeE…
exdx Oct 8, 2021
e37952b
fix: use v1 pdb object under e2e bundle test (#2398)
exdx Oct 8, 2021
bd29309
Improve reliability of e2e tests that include GRPC CatalogSources (#2…
awgreene Oct 13, 2021
55508ed
Makefile: Update the e2e-local target and add CI-friendly ginkgo opti…
timflannagan Oct 13, 2021
a42e9b4
Expose pprof endpoint if tls is not configured (#2422)
awgreene Oct 14, 2021
47d8f3c
Fix typo and add clarity to replacing transition (#2426)
perdasilva Oct 19, 2021
f7fdf89
Makefile: Explicitly override the default OLM install and test
timflannagan Sep 30, 2021
b575660
.github,test: Upload container logs during e2e runs as artifacts (#2432)
timflannagan Nov 3, 2021
a2f4723
test/e2e: Reduce subscription e2e test pollution (#2438)
timflannagan Nov 10, 2021
4a0f091
test/e2e: Fix 'resource name may not be empty' failure in catalog tem…
timflannagan Nov 18, 2021
a6861ac
remove panic (#2448)
akihikokuroda Nov 18, 2021
a4147d8
fix(sub): Only update subscriptions that have changes in status (#2399)
dinhxuanvu Nov 29, 2021
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ e2e/operator-registry: ## Run e2e registry tests
$(MAKE) e2e WHAT=operator-registry

e2e/olm: ## Run e2e olm tests
$(MAKE) e2e WHAT=operator-lifecycle-manager
$(MAKE) e2e WHAT=operator-lifecycle-manager E2E_INSTALL_NS=openshift-operator-lifecycle-manager E2E_TEST_NS=openshift-operators E2E_TIMEOUT=120m

.PHONY: vendor
vendor:
Expand Down
6 changes: 6 additions & 0 deletions manifests/0000_90_olm_01-prometheus-rule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ spec:
severity: warning
namespace: "{{ $labels.namespace }}"
annotations:
summary: CSV failed for over 2 minutes
description: Fires whenever a CSV has been in the failed phase for more than 2 minutes.
message: Failed to install Operator {{ $labels.name }} version {{ $labels.version }}. Reason-{{ $labels.reason }}
- alert: CsvAbnormalOver30Min
expr: csv_abnormal{phase=~"(^Replacing$|^Pending$|^Deleting$|^Unknown$)"}
Expand All @@ -29,6 +31,8 @@ spec:
severity: warning
namespace: "{{ $labels.namespace }}"
annotations:
summary: CSV abnormal for over 30 minutes
description: Fires whenever a CSV is in the Replacing, Pending, Deleting, or Unkown phase for more than 30 minutes.
message: Failed to install Operator {{ $labels.name }} version {{ $labels.version }}. Phase-{{ $labels.phase }} Reason-{{ $labels.reason }}
- name: olm.installplan.rules
rules:
Expand All @@ -37,4 +41,6 @@ spec:
labels:
severity: warning
annotations:
summary: API returned a warning when modifying an operator
description: Fires whenever the API server returns a warning when attempting to modify an operator.
message: The API server returned a warning during installation or upgrade of an operator. An Event with reason "AppliedWithWarnings" has been created with complete details, including a reference to the InstallPlan step that generated the warning.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v2
- name: Build the container image
uses: docker/build-push-action@v1
uses: docker/build-push-action@v2
with:
repository: operator-framework/olm
dockerfile: ./Dockerfile
context: .
file: Dockerfile
push: false
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:
run: |
kind create cluster
kind export kubeconfig
- name: Run e2e tests
- name: Run OLM
run: make run-local
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:
sudo mv minikube /bin/
- name: Setup minikube
run: minikube config set vm-driver docker
- name: Run e2e tests
- name: Run OLM
run: make run-local
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '~1.16'
- run: make e2e-local NODES=2 JUNIT_DIRECTORY=./artifacts/
- run: make e2e-local E2E_NODES=2 ARTIFACTS_DIR=./artifacts/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll technically need to update o/release as well as we explicitly specify the JUNIT_DIRECTORY there. Likely easiest to drop this commit from this PR and tackle at a later date?

Copy link
Contributor Author

@njhale njhale Nov 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this was a breaking change then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I called it out when the PR was opened: operator-framework/operator-lifecycle-manager#2432 (comment) - imo it's a quick change and not the end of the world as we're between freezes right now and have the flexibility to make these types of changes.

- name: Archive Test Artifacts # test results, failed or not, are always uploaded.
if: ${{ always() }}
uses: actions/upload-artifact@v2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: release
on:
pull_request:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: Get the image tag
if: startsWith(github.ref, 'refs/tags')
run: |
# Source: https://i.8713187.xyzmunity/t/how-to-get-just-the-tag-name/16241/32
if [[ $GITHUB_REF == refs/tags/* ]]; then
echo IMAGE_TAG="${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi

- name: Create a draft release
uses: actions/create-release@v1
id: release
if: startsWith(github.ref, 'refs/tags')
env:
GITHUB_TOKEN: ${{ github.token }}
with:
draft: true
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}

- name: Docker Login
uses: docker/login-action@v1
if: startsWith(github.ref, 'refs/tags')
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags')
with:
version: 0.177.0
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ github.token }}
IMAGE_REPO: ${{ secrets.QUAY_USERNAME }}/olm
PKG: github.com/operator-framework/operator-lifecycle-manager

- name: Generate quickstart release manifests
if: startsWith(github.ref, 'refs/tags')
run: make release ver=${{ env.IMAGE_TAG }} IMAGE_REPO=quay.io/${{ secrets.QUAY_USERNAME }}/olm

- name: Update release artifacts with rendered Kubernetes manifests
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags')
with:
name: ${{ env.IMAGE_TAG }}
files: |
deploy/upstream/quickstart/crds.yaml
deploy/upstream/quickstart/olm.yaml
deploy/upstream/quickstart/install.sh
draft: true
token: ${{ github.token }}
22 changes: 22 additions & 0 deletions staging/operator-lifecycle-manager/.github/workflows/sanity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ci

on:
push:
branches:
- '**'
pull_request:
paths-ignore:
- '**/*.md'

jobs:
sanity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '~1.16'
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Run sanity checks
run: make vendor && make lint && make diff
2 changes: 2 additions & 0 deletions staging/operator-lifecycle-manager/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,5 @@ apiserver.key

!vendor/**
test/e2e-local.image.tar

dist/
134 changes: 134 additions & 0 deletions staging/operator-lifecycle-manager/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
env:
- GO111MODULE=on
- CGO_ENABLED=0
before:
hooks:
- go mod tidy
- go mod vendor
builds:
- id: olm
main: ./cmd/olm
binary: olm
goos:
- linux
goarch:
- amd64
- arm64
- ppc64le
- s390x
tags:
- json1
flags:
- -mod=vendor
ldflags:
- -X {{ .Env.PKG }}/pkg/version.GitCommit={{ .FullCommit }}
- -X {{ .Env.PKG }}/pkg/version.OLMVersion={{ .Tag }}
- id: catalog
main: ./cmd/catalog
binary: catalog
goos:
- linux
goarch:
- amd64
- arm64
- ppc64le
- s390x
tags:
- json1
flags:
- -mod=vendor
ldflags:
- -X {{ .Env.PKG }}/pkg/version.GitCommit={{ .FullCommit }}
- -X {{ .Env.PKG }}/pkg/version.OLMVersion={{ .Tag }}
- id: cpb
main: ./util/cpb
binary: cpb
goos:
- linux
goarch:
- amd64
- arm64
- ppc64le
- s390x
tags:
- json1
flags:
- -mod=vendor
ldflags:
- -X {{ .Env.PKG }}/pkg/version.GitCommit={{ .FullCommit }}
- -X {{ .Env.PKG }}/pkg/version.OLMVersion={{ .Tag }}
- id: package-server
main: ./cmd/package-server
binary: package-server
goos:
- linux
goarch:
- amd64
- arm64
- ppc64le
- s390x
tags:
- json1
flags:
- -mod=vendor
ldflags:
- -X {{ .Env.PKG }}/pkg/version.GitCommit={{ .FullCommit }}
- -X {{ .Env.PKG }}/pkg/version.OLMVersion={{ .Tag }}
dockers:
- image_templates:
- quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}-amd64
dockerfile: Dockerfile.goreleaser
use: buildx
goos: linux
goarch: amd64
build_flag_templates:
- --platform=linux/amd64
- image_templates:
- quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}-arm64
dockerfile: Dockerfile.goreleaser
use: buildx
goos: linux
goarch: arm64
build_flag_templates:
- --platform=linux/arm64
- image_templates:
- quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}-ppc64le
dockerfile: Dockerfile.goreleaser
use: buildx
goos: linux
goarch: ppc64le
build_flag_templates:
- --platform=linux/ppc64le
- image_templates:
- quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}-s390x
dockerfile: Dockerfile.goreleaser
use: buildx
goos: linux
goarch: s390x
build_flag_templates:
- --platform=linux/s390x
docker_manifests:
- name_template: quay.io/{{ .Env.IMAGE_REPO }}:v{{ .Major }}.{{ .Minor }}
image_templates:
- quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}-amd64
- quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}-arm64
- quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}-ppc64le
- quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}-s390x
- name_template: quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}
image_templates:
- quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}-amd64
- quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}-arm64
- quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}-ppc64le
- quay.io/{{ .Env.IMAGE_REPO }}:{{ .Tag }}-s390x
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}"
changelog:
sort: asc
filters:
exclude:
- '^doc:'
- '^test:'
release:
draft: true
Loading