Skip to content

Commit 48b2b53

Browse files
authored
Merge pull request #23 from mikkeloscar/change-apiversion
Change apiVersion to zalando.org/v1
2 parents 2c39d42 + ee4270c commit 48b2b53

33 files changed

+113
-113
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ VERSION ?= $(shell git describe --tags --always --dirty)
55
IMAGE ?= mikkeloscar/$(BINARY)
66
TAG ?= $(VERSION)
77
SOURCES = $(shell find . -name '*.go')
8-
GENERATED = pkg/client pkg/apis/amazonaws.com/v1/zz_generated.deepcopy.go
8+
GENERATED = pkg/client pkg/apis/zalando.org/v1/zz_generated.deepcopy.go
99
DOCKERFILE ?= Dockerfile
1010
GOPKGS = $(shell go list ./...)
1111
BUILD_FLAGS ?= -v

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ applications in a namespace you need to define an `AWSIAMRole` resource which
7777
references the IAM role you want:
7878

7979
```yaml
80-
apiVersion: amazonaws.com/v1
80+
apiVersion: zalando.org/v1
8181
kind: AWSIAMRole
8282
metadata:
8383
name: my-app-iam-role

awsiamrole_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"strconv"
88
"time"
99

10-
av1 "github.com/mikkeloscar/kube-aws-iam-controller/pkg/apis/amazonaws.com/v1"
10+
av1 "github.com/mikkeloscar/kube-aws-iam-controller/pkg/apis/zalando.org/v1"
1111
"github.com/mikkeloscar/kube-aws-iam-controller/pkg/clientset"
1212
"github.com/mikkeloscar/kube-aws-iam-controller/pkg/recorder"
1313
log "github.com/sirupsen/logrus"
@@ -120,7 +120,7 @@ func (c *AWSIAMRoleController) refresh() error {
120120
return err
121121
}
122122

123-
awsIAMRoles, err := c.client.AmazonawsV1().AWSIAMRoles(c.namespace).List(metav1.ListOptions{})
123+
awsIAMRoles, err := c.client.ZalandoV1().AWSIAMRoles(c.namespace).List(metav1.ListOptions{})
124124
if err != nil {
125125
return err
126126
}
@@ -210,7 +210,7 @@ func (c *AWSIAMRoleController) refresh() error {
210210
Expiration: &expiryTime,
211211
}
212212

213-
_, err = c.client.AmazonawsV1().AWSIAMRoles(awsIAMRole.Namespace).UpdateStatus(&awsIAMRole)
213+
_, err = c.client.ZalandoV1().AWSIAMRoles(awsIAMRole.Namespace).UpdateStatus(&awsIAMRole)
214214
if err != nil {
215215
log.Errorf("Failed to update status for AWSIAMRole %s/%s: %v", awsIAMRole.Namespace, awsIAMRole.Name, err)
216216
continue
@@ -323,7 +323,7 @@ func (c *AWSIAMRoleController) refresh() error {
323323
}
324324

325325
// update AWSIAMRole status
326-
_, err = c.client.AmazonawsV1().AWSIAMRoles(awsIAMRole.Namespace).UpdateStatus(&awsIAMRole)
326+
_, err = c.client.ZalandoV1().AWSIAMRoles(awsIAMRole.Namespace).UpdateStatus(&awsIAMRole)
327327
if err != nil {
328328
log.Errorf("Failed to update status of AWSIAMRole %s/%s: %v", awsIAMRole.Namespace, awsIAMRole.Name, err)
329329
continue
@@ -393,7 +393,7 @@ func (c *AWSIAMRoleController) refresh() error {
393393
Expiration: &expiryTime,
394394
}
395395

396-
_, err = c.client.AmazonawsV1().AWSIAMRoles(awsIAMRole.Namespace).UpdateStatus(&awsIAMRole)
396+
_, err = c.client.ZalandoV1().AWSIAMRoles(awsIAMRole.Namespace).UpdateStatus(&awsIAMRole)
397397
if err != nil {
398398
log.Errorf("Failed to update status of AWSIAMRole %s/%s: %v", awsIAMRole.Namespace, awsIAMRole.Name, err)
399399
continue

awsiamrole_controller_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"testing"
55
"time"
66

7-
av1 "github.com/mikkeloscar/kube-aws-iam-controller/pkg/apis/amazonaws.com/v1"
7+
av1 "github.com/mikkeloscar/kube-aws-iam-controller/pkg/apis/zalando.org/v1"
88
fakeAWS "github.com/mikkeloscar/kube-aws-iam-controller/pkg/client/clientset/versioned/fake"
99
"github.com/mikkeloscar/kube-aws-iam-controller/pkg/clientset"
1010
"github.com/stretchr/testify/require"
@@ -17,7 +17,7 @@ import (
1717
func TestIsOwnedReference(t *testing.T) {
1818
owner := av1.AWSIAMRole{
1919
TypeMeta: metav1.TypeMeta{
20-
APIVersion: "amazonaws.com/v1",
20+
APIVersion: "zalando.org/v1",
2121
Kind: "AWSIAMRole",
2222
},
2323
ObjectMeta: metav1.ObjectMeta{
@@ -152,7 +152,7 @@ func TestRefreshAWSIAMRole(tt *testing.T) {
152152
client := clientset.NewClientset(kubeClient, awsKubeClient)
153153

154154
for _, role := range tc.awsIAMRoles {
155-
_, err := client.AmazonawsV1().AWSIAMRoles("default").Create(&role)
155+
_, err := client.ZalandoV1().AWSIAMRoles("default").Create(&role)
156156
require.NoError(t, err)
157157
}
158158

docs/aws_iam_role_crd.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
apiVersion: apiextensions.k8s.io/v1beta1
22
kind: CustomResourceDefinition
33
metadata:
4-
name: awsiamroles.amazonaws.com
4+
name: awsiamroles.zalando.org
55
spec:
6-
group: amazonaws.com
6+
group: zalando.org
77
version: v1
88
scope: Namespaced
99
names:

docs/deployment_with_role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ spec:
4141
secret:
4242
secretName: kube-aws-iam-controller-iam-role # name of the AWSIAMRole resource
4343
---
44-
apiVersion: amazonaws.com/v1
44+
apiVersion: zalando.org/v1
4545
kind: AWSIAMRole
4646
metadata:
4747
name: kube-aws-iam-controller-iam-role

docs/example-app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ spec:
4747
secret:
4848
secretName: my-app-iam-role # name of the AWSIAMRole resource
4949
---
50-
apiVersion: amazonaws.com/v1
50+
apiVersion: zalando.org/v1
5151
kind: AWSIAMRole
5252
metadata:
5353
name: my-app-iam-role

docs/rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ metadata:
1010
name: kube-aws-iam-controller
1111
rules:
1212
- apiGroups:
13-
- "amazonaws.com"
13+
- "zalando.org"
1414
resources:
1515
- awsiamroles
1616
- awsiamroles/status

docs/sdk-configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ spec:
5555
secret:
5656
secretName: aws-iam-java-example # name of the AWSIAMRole resource
5757
---
58-
apiVersion: amazonaws.com/v1
58+
apiVersion: zalando.org/v1
5959
kind: AWSIAMRole
6060
metadata:
6161
name: aws-iam-java-example
@@ -112,7 +112,7 @@ spec:
112112
secret:
113113
secretName: aws-iam-python-example # name of the AWSIAMRole resource
114114
---
115-
apiVersion: amazonaws.com/v1
115+
apiVersion: zalando.org/v1
116116
kind: AWSIAMRole
117117
metadata:
118118
name: aws-iam-python-example
@@ -181,7 +181,7 @@ spec:
181181
secret:
182182
secretName: aws-iam-golang-example # name of the AWSIAMRole resource
183183
---
184-
apiVersion: amazonaws.com/v1
184+
apiVersion: zalando.org/v1
185185
kind: AWSIAMRole
186186
metadata:
187187
name: aws-iam-golang-example

hack/update-codegen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set -o pipefail
2020

2121
SRC="github.com"
2222
GOPKG="$SRC/mikkeloscar/kube-aws-iam-controller"
23-
CUSTOM_RESOURCE_NAME="amazonaws.com"
23+
CUSTOM_RESOURCE_NAME="zalando.org"
2424
CUSTOM_RESOURCE_VERSION="v1"
2525

2626
SCRIPT_ROOT="$(dirname "${BASH_SOURCE[0]}")/.."

0 commit comments

Comments
 (0)