Skip to content

Commit 006d31c

Browse files
Merge pull request #59 from adambkaplan/upgrade-osdk-1.17.0
Upgrade operator-sdk to 1.17.0
2 parents 168868e + dfd8d63 commit 006d31c

File tree

2,156 files changed

+188500
-44127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,156 files changed

+188500
-44127
lines changed

Makefile

Lines changed: 166 additions & 126 deletions
Large diffs are not rendered by default.

bundle.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
66
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
77
LABEL operators.operatorframework.io.bundle.package.v1=shipwright-operator
88
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
9-
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.13.0+git
9+
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.16.0+git
1010
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
1111
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
1212

bundle/manifests/operator.shipwright.io_shipwrightbuilds.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.6.1
5+
controller-gen.kubebuilder.io/version: v0.8.0
66
creationTimestamp: null
77
name: shipwrightbuilds.operator.shipwright.io
88
spec:
@@ -51,13 +51,12 @@ spec:
5151
description: "Condition contains details for one aspect of the current
5252
state of this API Resource. --- This struct is intended for direct
5353
use as an array at the field path .status.conditions. For example,
54-
type FooStatus struct{ // Represents the observations of a
55-
foo's current state. // Known .status.conditions.type are:
56-
\"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type
57-
\ // +patchStrategy=merge // +listType=map // +listMapKey=type
58-
\ Conditions []metav1.Condition `json:\"conditions,omitempty\"
59-
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
60-
\n // other fields }"
54+
type FooStatus struct{ // Represents the observations of a foo's
55+
current state. // Known .status.conditions.type are: \"Available\",
56+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
57+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
58+
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
59+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
6160
properties:
6261
lastTransitionTime:
6362
description: lastTransitionTime is the last time the condition

bundle/manifests/shipwright-operator.clusterserviceversion.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ metadata:
1919
categories: Developer Tools
2020
certified: "false"
2121
description: Shipwright is a framework for building container images on Kubernetes.
22-
operators.operatorframework.io/builder: operator-sdk-v1.13.0+git
22+
operators.operatorframework.io/builder: operator-sdk-v1.16.0+git
2323
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
2424
repository: https://github.com/shipwright-io/operator
2525
support: The Shipwright Contributors
@@ -540,6 +540,8 @@ spec:
540540
strategy: {}
541541
template:
542542
metadata:
543+
annotations:
544+
kubectl.kubernetes.io/default-container: operator
543545
labels:
544546
app: shipwright-operator
545547
spec:
@@ -548,14 +550,20 @@ spec:
548550
- --secure-listen-address=0.0.0.0:8443
549551
- --upstream=http://127.0.0.1:8080/
550552
- --logtostderr=true
551-
- --v=10
553+
- --v=0
552554
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
553555
name: kube-rbac-proxy
554556
ports:
555557
- containerPort: 8443
556558
name: https
557559
protocol: TCP
558-
resources: {}
560+
resources:
561+
limits:
562+
cpu: 500m
563+
memory: 128Mi
564+
requests:
565+
cpu: 5m
566+
memory: 64Mi
559567
- args:
560568
- --health-probe-bind-address=:8081
561569
- --metrics-bind-address=127.0.0.1:8080

bundle/metadata/annotations.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ annotations:
55
operators.operatorframework.io.bundle.metadata.v1: metadata/
66
operators.operatorframework.io.bundle.package.v1: shipwright-operator
77
operators.operatorframework.io.bundle.channels.v1: alpha
8-
operators.operatorframework.io.metrics.builder: operator-sdk-v1.13.0+git
8+
operators.operatorframework.io.metrics.builder: operator-sdk-v1.16.0+git
99
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
1010
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3
1111

config/crd/bases/operator.shipwright.io_shipwrightbuilds.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.6.1
6+
controller-gen.kubebuilder.io/version: v0.8.0
87
creationTimestamp: null
98
name: shipwrightbuilds.operator.shipwright.io
109
spec:
@@ -53,13 +52,12 @@ spec:
5352
description: "Condition contains details for one aspect of the current
5453
state of this API Resource. --- This struct is intended for direct
5554
use as an array at the field path .status.conditions. For example,
56-
type FooStatus struct{ // Represents the observations of a
57-
foo's current state. // Known .status.conditions.type are:
58-
\"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type
59-
\ // +patchStrategy=merge // +listType=map // +listMapKey=type
60-
\ Conditions []metav1.Condition `json:\"conditions,omitempty\"
61-
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
62-
\n // other fields }"
55+
type FooStatus struct{ // Represents the observations of a foo's
56+
current state. // Known .status.conditions.type are: \"Available\",
57+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
58+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
59+
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
60+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
6361
properties:
6462
lastTransitionTime:
6563
description: lastTransitionTime is the last time the condition

config/default/manager_auth_proxy_patch.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,18 @@ spec:
1515
- "--secure-listen-address=0.0.0.0:8443"
1616
- "--upstream=http://127.0.0.1:8080/"
1717
- "--logtostderr=true"
18-
- "--v=10"
18+
- "--v=0"
1919
ports:
2020
- containerPort: 8443
2121
protocol: TCP
2222
name: https
23+
resources:
24+
limits:
25+
cpu: 500m
26+
memory: 128Mi
27+
requests:
28+
cpu: 5m
29+
memory: 64Mi
2330
- name: operator
2431
args:
2532
- "--health-probe-bind-address=:8081"

config/manager/manager.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ spec:
1919
replicas: 1
2020
template:
2121
metadata:
22+
annotations:
23+
kubectl.kubernetes.io/default-container: operator
2224
labels:
2325
app: shipwright-operator
2426
spec:

config/rbac/role.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
---
32
apiVersion: rbac.authorization.k8s.io/v1
43
kind: ClusterRole

controllers/suite_test.go

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ import (
3232
// These tests use Ginkgo (BDD-style Go testing framework). Refer to
3333
// http://onsi.github.io/ginkgo/ to learn more about Ginkgo.
3434

35-
var k8sClient client.Client
36-
var ctx context.Context
37-
var testEnv *envtest.Environment
38-
var restTimeout = 5 * time.Second
39-
var restRetry = 100 * time.Millisecond
35+
var (
36+
k8sClient client.Client
37+
ctx context.Context
38+
cancel context.CancelFunc
39+
testEnv *envtest.Environment
40+
restTimeout = 5 * time.Second
41+
restRetry = 100 * time.Millisecond
42+
)
4043

4144
func TestAPIs(t *testing.T) {
4245
RegisterFailHandler(Fail)
@@ -50,9 +53,12 @@ func TestAPIs(t *testing.T) {
5053
var _ = BeforeSuite(func() {
5154
logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true)))
5255

56+
ctx, cancel = context.WithCancel(context.TODO())
57+
5358
By("bootstrapping test environment")
5459
testEnv = &envtest.Environment{
55-
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
60+
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
61+
ErrorIfCRDPathMissing: true,
5662
}
5763

5864
cfg, err := testEnv.Start()
@@ -73,7 +79,8 @@ var _ = BeforeSuite(func() {
7379
Expect(err).NotTo(HaveOccurred())
7480
crdClient, err := crdclientv1.NewForConfig(mgr.GetConfig())
7581
Expect(err).NotTo(HaveOccurred())
76-
toClient, _ := tektonoperatorv1alpha1client.NewForConfig(mgr.GetConfig())
82+
toClient, err := tektonoperatorv1alpha1client.NewForConfig(mgr.GetConfig())
83+
Expect(err).NotTo(HaveOccurred())
7784
err = (&ShipwrightBuildReconciler{
7885
CRDClient: crdClient,
7986
TektonOperatorClient: toClient,
@@ -83,8 +90,6 @@ var _ = BeforeSuite(func() {
8390
}).SetupWithManager(mgr)
8491
Expect(err).NotTo(HaveOccurred())
8592

86-
ctx = ctrl.SetupSignalHandler()
87-
8893
go func() {
8994
err := mgr.Start(ctx)
9095
Expect(err).NotTo(HaveOccurred())
@@ -97,6 +102,7 @@ var _ = BeforeSuite(func() {
97102
}, 60)
98103

99104
var _ = AfterSuite(func() {
105+
cancel()
100106
By("tearing down the test environment")
101107
err := testEnv.Stop()
102108
Expect(err).NotTo(HaveOccurred())

0 commit comments

Comments
 (0)