Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Update operator-sdk to version 0.18.2 (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Pereira authored Jun 23, 2021
1 parent fa6ab8d commit e34c320
Show file tree
Hide file tree
Showing 8 changed files with 11,713 additions and 11,387 deletions.
2 changes: 1 addition & 1 deletion .github/action/operator-sdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL "com.github.actions.icon"="layers"
LABEL "com.github.actions.color"="red"

# add operator-sdk release binary
ARG operator_sdk_version=v0.17.2
ARG operator_sdk_version=v0.18.2
ARG operator_sdk_base=https://github.com/operator-framework/operator-sdk/releases/download/
ARG sdk_cli=/usr/bin/operator-sdk

Expand Down
11,418 changes: 5,785 additions & 5,633 deletions deploy/crds/app_v1alpha1_akkacluster_crd.yaml

Large diffs are not rendered by default.

11,418 changes: 5,785 additions & 5,633 deletions deploy/olm-catalog/akka-cluster-operator/1.0.3/app_v1alpha1_akkacluster_crd.yaml

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ module github.com/lightbend/akka-cluster-operator
go 1.13

require (
github.com/go-openapi/spec v0.19.4
github.com/go-openapi/spec v0.19.3
github.com/google/go-cmp v0.4.0
github.com/operator-framework/operator-sdk v0.17.2
github.com/operator-framework/operator-sdk v0.18.2
github.com/spf13/pflag v1.0.5
k8s.io/api v0.17.4
k8s.io/apimachinery v0.17.4
k8s.io/api v0.18.2
k8s.io/apimachinery v0.18.2
k8s.io/client-go v12.0.0+incompatible
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a
sigs.k8s.io/controller-runtime v0.5.2
k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c
sigs.k8s.io/controller-runtime v0.6.0
)

replace (
github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.2+incompatible // Required by OLM
k8s.io/client-go => k8s.io/client-go v0.17.4 // Required by prometheus-operator
k8s.io/client-go => k8s.io/client-go v0.18.2 // Required by prometheus-operator
)
235 changes: 128 additions & 107 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/apis/app/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions pkg/controller/akkacluster/akkacluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/handler"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
"sigs.k8s.io/controller-runtime/pkg/source"

appv1alpha1 "github.com/lightbend/akka-cluster-operator/pkg/apis/app/v1alpha1"
Expand Down Expand Up @@ -139,12 +139,13 @@ func (r *ReconcileAkkaCluster) Reconcile(request reconcile.Request) (reconcile.R
reqLogger.Info("Creating resource", "kind", kind)
return reconcile.Result{Requeue: true}, nil
}
// Update cluster resource to wanted resource, if needed.
// Patch cluster resource to wanted resource, if needed.
if !SubsetEqual(wantedResource, clusterResource) {
reqLogger.Info("applying update", "kind", kind, "match")

if err := r.client.Update(context.TODO(), wantedResource); err != nil {
reqLogger.Info("Tried to update resource", "kind", kind, "error", err)
// patch.Merge uses the raw object as a merge patch, without modifications.
if err := r.client.Patch(context.TODO(), wantedResource, client.Merge); err != nil {
reqLogger.Info("Tried to patch resource", "kind", kind, "error", err)
return reconcile.Result{}, err
}
return reconcile.Result{Requeue: true}, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/akkacluster/akkacluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestAkkaController(t *testing.T) {
// mock context for reconciler
scheme := scheme.Scheme
scheme.AddKnownTypes(appv1alpha1.SchemeGroupVersion, akkaCluster)
client := fake.NewFakeClient(akkaCluster)
client := fake.NewFakeClientWithScheme(scheme, akkaCluster)
r := &ReconcileAkkaCluster{client: client, scheme: scheme}

// mock event loop
Expand Down

0 comments on commit e34c320

Please sign in to comment.