Skip to content
This repository was archived by the owner on Nov 18, 2020. It is now read-only.

Commit 1306fcc

Browse files
feat: upgrade go sample to use 0.18.1 SDK version (#131)
1 parent 0cdc4f9 commit 1306fcc

6 files changed

Lines changed: 215 additions & 205 deletions

File tree

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: apiextensions.k8s.io/v1beta1
1+
apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
name: memcacheds.cache.example.com
@@ -10,49 +10,48 @@ spec:
1010
plural: memcacheds
1111
singular: memcached
1212
scope: Namespaced
13-
subresources:
14-
status: {}
15-
validation:
16-
openAPIV3Schema:
17-
description: Memcached is the Schema for the memcacheds API
18-
properties:
19-
apiVersion:
20-
description: 'APIVersion defines the versioned schema of this representation
21-
of an object. Servers should convert recognized schemas to the latest
22-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
23-
type: string
24-
kind:
25-
description: 'Kind is a string value representing the REST resource this
26-
object represents. Servers may infer this from the endpoint the client
27-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
28-
type: string
29-
metadata:
30-
type: object
31-
spec:
32-
description: MemcachedSpec defines the desired state of Memcached
33-
properties:
34-
size:
35-
description: Size is the size of the memcached deployment
36-
format: int32
37-
type: integer
38-
required:
39-
- size
40-
type: object
41-
status:
42-
description: MemcachedStatus defines the observed state of Memcached
43-
properties:
44-
nodes:
45-
description: Nodes are the names of the memcached pods
46-
items:
47-
type: string
48-
type: array
49-
x-kubernetes-list-type: set
50-
required:
51-
- nodes
52-
type: object
53-
type: object
54-
version: v1alpha1
5513
versions:
5614
- name: v1alpha1
15+
schema:
16+
openAPIV3Schema:
17+
description: Memcached is the Schema for the memcacheds API
18+
properties:
19+
apiVersion:
20+
description: 'APIVersion defines the versioned schema of this representation
21+
of an object. Servers should convert recognized schemas to the latest
22+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
23+
type: string
24+
kind:
25+
description: 'Kind is a string value representing the REST resource this
26+
object represents. Servers may infer this from the endpoint the client
27+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
28+
type: string
29+
metadata:
30+
type: object
31+
spec:
32+
description: MemcachedSpec defines the desired state of Memcached
33+
properties:
34+
size:
35+
description: Size is the size of the memcached deployment
36+
format: int32
37+
type: integer
38+
required:
39+
- size
40+
type: object
41+
status:
42+
description: MemcachedStatus defines the observed state of Memcached
43+
properties:
44+
nodes:
45+
description: Nodes are the names of the memcached pods
46+
items:
47+
type: string
48+
type: array
49+
x-kubernetes-list-type: set
50+
required:
51+
- nodes
52+
type: object
53+
type: object
5754
served: true
5855
storage: true
56+
subresources:
57+
status: {}
Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: apiextensions.k8s.io/v1beta1
1+
apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
name: memcacheds.cache.example.com
@@ -10,49 +10,48 @@ spec:
1010
plural: memcacheds
1111
singular: memcached
1212
scope: Namespaced
13-
subresources:
14-
status: {}
15-
validation:
16-
openAPIV3Schema:
17-
description: Memcached is the Schema for the memcacheds API
18-
properties:
19-
apiVersion:
20-
description: 'APIVersion defines the versioned schema of this representation
21-
of an object. Servers should convert recognized schemas to the latest
22-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
23-
type: string
24-
kind:
25-
description: 'Kind is a string value representing the REST resource this
26-
object represents. Servers may infer this from the endpoint the client
27-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
28-
type: string
29-
metadata:
30-
type: object
31-
spec:
32-
description: MemcachedSpec defines the desired state of Memcached
33-
properties:
34-
size:
35-
description: Size is the size of the memcached deployment
36-
format: int32
37-
type: integer
38-
required:
39-
- size
40-
type: object
41-
status:
42-
description: MemcachedStatus defines the observed state of Memcached
43-
properties:
44-
nodes:
45-
description: Nodes are the names of the memcached pods
46-
items:
47-
type: string
48-
type: array
49-
x-kubernetes-list-type: set
50-
required:
51-
- nodes
52-
type: object
53-
type: object
54-
version: v1alpha1
5513
versions:
5614
- name: v1alpha1
15+
schema:
16+
openAPIV3Schema:
17+
description: Memcached is the Schema for the memcacheds API
18+
properties:
19+
apiVersion:
20+
description: 'APIVersion defines the versioned schema of this representation
21+
of an object. Servers should convert recognized schemas to the latest
22+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
23+
type: string
24+
kind:
25+
description: 'Kind is a string value representing the REST resource this
26+
object represents. Servers may infer this from the endpoint the client
27+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
28+
type: string
29+
metadata:
30+
type: object
31+
spec:
32+
description: MemcachedSpec defines the desired state of Memcached
33+
properties:
34+
size:
35+
description: Size is the size of the memcached deployment
36+
format: int32
37+
type: integer
38+
required:
39+
- size
40+
type: object
41+
status:
42+
description: MemcachedStatus defines the observed state of Memcached
43+
properties:
44+
nodes:
45+
description: Nodes are the names of the memcached pods
46+
items:
47+
type: string
48+
type: array
49+
x-kubernetes-list-type: set
50+
required:
51+
- nodes
52+
type: object
53+
type: object
5754
served: true
5855
storage: true
56+
subresources:
57+
status: {}

go/memcached-operator/deploy/olm-catalog/memcached-operator/manifests/memcached-operator.clusterserviceversion.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ metadata:
1616
}
1717
]
1818
capabilities: Basic Install
19-
name: memcached-operator.v0.17.0
19+
name: memcached-operator.v0.18.1
2020
namespace: placeholder
2121
spec:
2222
apiservicedefinitions: {}
@@ -162,4 +162,4 @@ spec:
162162
provider:
163163
name: Example
164164
url: www.example.com
165-
version: 0.17.0
165+
version: 0.18.1

go/memcached-operator/go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ module github.com/operator-framework/operator-sdk-samples/go/memcached-operator
33
go 1.13
44

55
require (
6-
github.com/operator-framework/operator-sdk v0.17.0
6+
github.com/operator-framework/operator-sdk v0.18.1
77
github.com/spf13/pflag v1.0.5
8-
k8s.io/api v0.17.4
9-
k8s.io/apimachinery v0.17.4
8+
k8s.io/api v0.18.2
9+
k8s.io/apimachinery v0.18.2
1010
k8s.io/client-go v12.0.0+incompatible
11-
sigs.k8s.io/controller-runtime v0.5.2
11+
sigs.k8s.io/controller-runtime v0.6.0
1212
)
1313

1414
replace (
1515
github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.2+incompatible // Required by OLM
16-
k8s.io/client-go => k8s.io/client-go v0.17.4 // Required by prometheus-operator
16+
k8s.io/client-go => k8s.io/client-go v0.18.2 // Required by prometheus-operator
1717
)

0 commit comments

Comments
 (0)