Skip to content

Commit 9cb2e0d

Browse files
committed
rename v1 api to v2 before the actual changes
1 parent c73e879 commit 9cb2e0d

27 files changed

Lines changed: 241 additions & 241 deletions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
1313
limitations under the License.
1414
*/
1515

16-
package v1
16+
package v2
1717

1818
import (
1919
appsv1 "k8s.io/api/apps/v1"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
1313
limitations under the License.
1414
*/
1515

16-
package v1
16+
package v2
1717

1818
import (
1919
"github.com/lwolf/konsumerator/pkg/helpers"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ limitations under the License.
1616
// Package v1 contains API Schema definitions for the konsumerator v1 API group
1717
// +kubebuilder:object:generate=true
1818
// +groupName=konsumerator.lwolf.org
19-
package v1
19+
package v2
2020

2121
import (
2222
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -25,7 +25,7 @@ import (
2525

2626
var (
2727
// GroupVersion is group version used to register these objects
28-
GroupVersion = schema.GroupVersion{Group: "konsumerator.lwolf.org", Version: "v1"}
28+
GroupVersion = schema.GroupVersion{Group: "konsumerator.lwolf.org", Version: "v2"}
2929

3030
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
3131
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
1313
limitations under the License.
1414
*/
1515

16-
package v1
16+
package v2
1717

1818
import (
1919
"path/filepath"
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ limitations under the License.
1717

1818
// autogenerated by controller-gen object, do not modify manually
1919

20-
package v1
20+
package v2
2121

2222
import (
23-
corev1 "k8s.io/api/core/v1"
23+
"k8s.io/api/core/v1"
2424
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2525
runtime "k8s.io/apimachinery/pkg/runtime"
2626
)
@@ -242,14 +242,14 @@ func (in *ContainerResourcePolicy) DeepCopyInto(out *ContainerResourcePolicy) {
242242
}
243243
if in.MinAllowed != nil {
244244
in, out := &in.MinAllowed, &out.MinAllowed
245-
*out = make(corev1.ResourceList, len(*in))
245+
*out = make(v1.ResourceList, len(*in))
246246
for key, val := range *in {
247247
(*out)[key] = val.DeepCopy()
248248
}
249249
}
250250
if in.MaxAllowed != nil {
251251
in, out := &in.MaxAllowed, &out.MaxAllowed
252-
*out = make(corev1.ResourceList, len(*in))
252+
*out = make(v1.ResourceList, len(*in))
253253
for key, val := range *in {
254254
(*out)[key] = val.DeepCopy()
255255
}
@@ -271,7 +271,7 @@ func (in *GlobalResourcePolicy) DeepCopyInto(out *GlobalResourcePolicy) {
271271
*out = *in
272272
if in.MaxAllowed != nil {
273273
in, out := &in.MaxAllowed, &out.MaxAllowed
274-
*out = make(corev1.ResourceList, len(*in))
274+
*out = make(v1.ResourceList, len(*in))
275275
for key, val := range *in {
276276
(*out)[key] = val.DeepCopy()
277277
}

config/crd/bases/konsumerator.lwolf.org_consumers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5292,7 +5292,7 @@ spec:
52925292
type: object
52935293
type: object
52945294
versions:
5295-
- name: v1
5295+
- name: v2
52965296
served: true
52975297
storage: true
52985298
status:

controllers/configmap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636

3737
"github.com/lwolf/konsumerator/pkg/errors"
3838

39-
konsumeratorv1 "github.com/lwolf/konsumerator/api/v1"
39+
konsumeratorv2 "github.com/lwolf/konsumerator/api/v2"
4040
)
4141

4242
const (
@@ -115,7 +115,7 @@ func (r *ConfigMapReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
115115
return ctrl.Result{}, nil
116116
}
117117

118-
var consumer konsumeratorv1.Consumer
118+
var consumer konsumeratorv2.Consumer
119119
var data string
120120
for i := range cm.Data {
121121
data = cm.Data[i]

controllers/configmap_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package controllers
33
import (
44
"bytes"
55
"fmt"
6-
konsumeratorv1 "github.com/lwolf/konsumerator/api/v1"
6+
konsumeratorv2 "github.com/lwolf/konsumerator/api/v2"
77
"k8s.io/apimachinery/pkg/util/yaml"
88
"testing"
99
)
@@ -119,7 +119,7 @@ resourcePolicy:
119119
memory: "100M"
120120
`)
121121

122-
var consumer konsumeratorv1.Consumer
122+
var consumer konsumeratorv2.Consumer
123123
br := bytes.NewReader(data)
124124
d := yaml.NewYAMLToJSONDecoder(br)
125125
if err := d.Decode(&consumer.Spec); err != nil {

controllers/consumer.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
ctrl "sigs.k8s.io/controller-runtime"
3131
"sigs.k8s.io/controller-runtime/pkg/client"
3232

33-
konsumeratorv1 "github.com/lwolf/konsumerator/api/v1"
33+
konsumeratorv2 "github.com/lwolf/konsumerator/api/v2"
3434
"github.com/lwolf/konsumerator/pkg/errors"
3535
)
3636

@@ -77,7 +77,7 @@ func (r *ConsumerReconciler) SetupWithManager(mgr ctrl.Manager) error {
7777
}
7878

7979
return ctrl.NewControllerManagedBy(mgr).
80-
For(&konsumeratorv1.Consumer{}).
80+
For(&konsumeratorv2.Consumer{}).
8181
Owns(&appsv1.Deployment{}).
8282
Complete(r)
8383
}
@@ -98,7 +98,7 @@ func (r *ConsumerReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
9898
log := r.Log.WithValues("consumer", req.NamespacedName)
9999
result := ctrl.Result{RequeueAfter: defaultMinSyncPeriod}
100100

101-
var consumer konsumeratorv1.Consumer
101+
var consumer konsumeratorv2.Consumer
102102
if err := r.Get(ctx, req.NamespacedName, &consumer); err != nil {
103103
// we'll ignore not-found errors, since they can't be fixed by an immediate
104104
// requeue (we'll need to wait for a new notification), and we can get them

0 commit comments

Comments
 (0)