Skip to content

Bump k8s dependencies to 1.23 to align with o-f/api #2574

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

Closed
wants to merge 1 commit into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: unit
env:
K8S_VERSION: 1.19.2
on:
push:
branches:
Expand All @@ -13,11 +15,9 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '~1.17'
- name: Install Kubebuilder
- name: Envtest setup
run: |
os=$(go env GOOS)
arch=$(go env GOARCH)
curl -L https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.1/kubebuilder_2.3.1_${os}_${arch}.tar.gz | tar -xz -C /tmp/
sudo mv /tmp/kubebuilder_2.3.1_${os}_${arch} /usr/local/kubebuilder
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
setup-envtest use ${K8S_VERSION}
- name: Run unit tests
run: make unit
run: KUBEBUILDER_ASSETS=$(setup-envtest use -i -p path ${K8S_VERSION}) make unit
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ WORKDIR /build
# install dependencies and go 1.16

# copy just enough of the git repo to parse HEAD, used to record version in OLM binaries
RUN dnf update -y && dnf install -y bash make git mercurial jq wget golang && dnf upgrade -y
RUN dnf update -y && dnf install -y bash make git mercurial jq wget && dnf upgrade -y
RUN curl -sSL https://go.dev/dl/go1.17.6.linux-amd64.tar.gz | tar -xzf - -C /usr/local
ENV PATH=/usr/local/go/bin:$PATH
COPY .git/HEAD .git/HEAD
COPY .git/refs/heads/. .git/refs/heads
RUN mkdir -p .git/objects
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ test: clean cover.out
unit: kubebuilder
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test $(MOD_FLAGS) $(SPECIFIC_UNIT_TEST) -tags "json1" -race -count=1 ./pkg/... ./test/e2e/split/...

# Ensure kubebuilder is installed before continuing
KUBEBUILDER_ASSETS_ERR := not detected in $(KUBEBUILDER_ASSETS), to override the assets path set the KUBEBUILDER_ASSETS environment variable, for install instructions see https://book.kubebuilder.io/quick-start.html
# Ensure kubectl installed before continuing
KUBEBUILDER_ASSETS_ERR := not detected in $(KUBEBUILDER_ASSETS), to override the assets path set the KUBEBUILDER_ASSETS environment variable, for install instructions see https://pkg.go.dev/sigs.k8s.io/controller-runtime/tools/setup-envtest
KUBECTL_ASSETS_ERR := kubectl not detected.
kubebuilder:
ifeq (, $(wildcard $(KUBEBUILDER_ASSETS)/kubebuilder))
$(error kubebuilder $(KUBEBUILDER_ASSETS_ERR))
ifeq (, $(shell which kubectl))
$(error $(KUBECTL_ASSETS_ERR))
endif
ifeq (, $(wildcard $(KUBEBUILDER_ASSETS)/etcd))
$(error etcd $(KUBEBUILDER_ASSETS_ERR))
Expand Down
6 changes: 6 additions & 0 deletions cmd/package-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

log "github.com/sirupsen/logrus"
"k8s.io/component-base/logs"
"k8s.io/klog"

"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/signals"
"github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/server"
Expand All @@ -19,6 +20,11 @@ func main() {
options := server.NewPackageServerOptions(os.Stdout, os.Stderr)
cmd := server.NewCommandStartPackageServer(ctx, options)
cmd.Flags().AddGoFlagSet(flag.CommandLine)
// klog flags used by dependencies need to be explicitly initialized now
klogFlags := flag.NewFlagSet("klog", flag.ExitOnError)
klog.InitFlags(klogFlags)
cmd.Flags().AddGoFlagSet(klogFlags)

if err := cmd.Flags().Parse(flag.Args()); err != nil {
log.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions deploy/chart/crds/0000_50_olm_00-catalogsources.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
name: catalogsources.operators.coreos.com
spec:
Expand Down Expand Up @@ -145,7 +145,7 @@ spec:
description: Represents the state of a CatalogSource. Note that Message and Reason represent the original status information, which may be migrated to be conditions based in the future. Any new features introduced will use conditions.
type: array
items:
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
type: object
required:
- lastTransitionTime
Expand Down
Loading