Skip to content

Commit ee6ef98

Browse files
committed
IR-295: upgrade to Go 1.19
1 parent 0c24a54 commit ee6ef98

File tree

6 files changed

+25
-20
lines changed

6 files changed

+25
-20
lines changed

.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
name: release
33
namespace: openshift
4-
tag: rhel-8-release-golang-1.18-openshift-4.12
4+
tag: rhel-8-release-golang-1.19-openshift-4.12

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.18-openshift-4.12 AS builder
1+
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.12 AS builder
22
WORKDIR /go/src/github.com/openshift/cluster-image-registry-operator
33
COPY . .
44
RUN make build

pkg/client/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
// GetConfig creates a *rest.Config for talking to a Kubernetes apiserver.
2424
// Otherwise will assume running in cluster and use the cluster provided kubeconfig.
2525
//
26-
// Config precedence
26+
// # Config precedence
2727
//
2828
// * KUBECONFIG environment variable pointing at a file
2929
//

pkg/resource/generator.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ func (g *Generator) List(cr *imageregistryv1.Config) ([]Mutator, error) {
118118
// syncStorage checks:
119119
// 1.) to make sure that an existing storage medium still exists and we can access it
120120
// 2.) to see if the storage medium name changed and we need to:
121-
// a.) check to make sure that we can access the storage or
122-
// b.) see if we need to try to create the new storage
121+
//
122+
// a.) check to make sure that we can access the storage or
123+
// b.) see if we need to try to create the new storage
123124
func (g *Generator) syncStorage(cr *imageregistryv1.Config) error {
124125
var runCreate bool
125126
// Create a driver with the current configuration

pkg/storage/s3/s3.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,18 @@ func (d *driver) UpdateEffectiveConfig() error {
170170
// GetCredentialsFile will create and return the location of an AWS config file that can
171171
// be used to create AWS clients with. Caller is responsible for cleaning up the file.
172172
// sharedCredentialsFile, err := d.GetCredentialsFile()
173-
// if err != nil {
174-
// // handle error
175-
// }
173+
//
174+
// if err != nil {
175+
// // handle error
176+
// }
177+
//
176178
// defer os.Remove(sharedCredentialsFile)
177-
// options := session.Options{
178-
// SharedConfigState: session.SharedConfigEnable,
179-
// SharedConfigFiles: []string{sharedCredentialsFile},
180-
// }
179+
//
180+
// options := session.Options{
181+
// SharedConfigState: session.SharedConfigEnable,
182+
// SharedConfigFiles: []string{sharedCredentialsFile},
183+
// }
184+
//
181185
// sess := session.Must(session.NewSessionWithOptions(options))
182186
func (d *driver) GetCredentialsFile() (string, error) {
183187
data, err := d.getCredentialsConfigData()

pkg/storage/storage.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,14 @@ func NewDriver(cfg *imageregistryv1.ImageRegistryConfigStorage, kubeconfig *rest
160160
// replicas for this platform.
161161
//
162162
// Following rules apply:
163-
// - If it is a known platform for which we have a backend implementation (e.g.
164-
// AWS) we return a storage configuration that uses that implementation.
165-
// - If it is a known platform and it doesn't provide any backend implementation,
166-
// we return an empty storage configuration.
167-
// - If it is a unknown platform we return a storage configuration with EmptyDir.
168-
// This is useful as it easily allows other teams to experiment with OpenShift
169-
// in new platforms, if it is LibVirt platform we also return EmptyDir for
170-
// historical reasons.
163+
// - If it is a known platform for which we have a backend implementation (e.g.
164+
// AWS) we return a storage configuration that uses that implementation.
165+
// - If it is a known platform and it doesn't provide any backend implementation,
166+
// we return an empty storage configuration.
167+
// - If it is a unknown platform we return a storage configuration with EmptyDir.
168+
// This is useful as it easily allows other teams to experiment with OpenShift
169+
// in new platforms, if it is LibVirt platform we also return EmptyDir for
170+
// historical reasons.
171171
func GetPlatformStorage(listers *regopclient.StorageListers) (imageregistryv1.ImageRegistryConfigStorage, int32, error) {
172172
var cfg imageregistryv1.ImageRegistryConfigStorage
173173
replicas := int32(1)

0 commit comments

Comments
 (0)