Skip to content

Commit

Permalink
Merge ee4270c into 2c39d42
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkeloscar committed Jun 13, 2019
2 parents 2c39d42 + ee4270c commit c9b2869
Show file tree
Hide file tree
Showing 33 changed files with 113 additions and 113 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VERSION ?= $(shell git describe --tags --always --dirty)
IMAGE ?= mikkeloscar/$(BINARY)
TAG ?= $(VERSION)
SOURCES = $(shell find . -name '*.go')
GENERATED = pkg/client pkg/apis/amazonaws.com/v1/zz_generated.deepcopy.go
GENERATED = pkg/client pkg/apis/zalando.org/v1/zz_generated.deepcopy.go
DOCKERFILE ?= Dockerfile
GOPKGS = $(shell go list ./...)
BUILD_FLAGS ?= -v
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ applications in a namespace you need to define an `AWSIAMRole` resource which
references the IAM role you want:

```yaml
apiVersion: amazonaws.com/v1
apiVersion: zalando.org/v1
kind: AWSIAMRole
metadata:
name: my-app-iam-role
Expand Down
10 changes: 5 additions & 5 deletions awsiamrole_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"
"time"

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

awsIAMRoles, err := c.client.AmazonawsV1().AWSIAMRoles(c.namespace).List(metav1.ListOptions{})
awsIAMRoles, err := c.client.ZalandoV1().AWSIAMRoles(c.namespace).List(metav1.ListOptions{})
if err != nil {
return err
}
Expand Down Expand Up @@ -210,7 +210,7 @@ func (c *AWSIAMRoleController) refresh() error {
Expiration: &expiryTime,
}

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

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

_, err = c.client.AmazonawsV1().AWSIAMRoles(awsIAMRole.Namespace).UpdateStatus(&awsIAMRole)
_, err = c.client.ZalandoV1().AWSIAMRoles(awsIAMRole.Namespace).UpdateStatus(&awsIAMRole)
if err != nil {
log.Errorf("Failed to update status of AWSIAMRole %s/%s: %v", awsIAMRole.Namespace, awsIAMRole.Name, err)
continue
Expand Down
6 changes: 3 additions & 3 deletions awsiamrole_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

av1 "github.com/mikkeloscar/kube-aws-iam-controller/pkg/apis/amazonaws.com/v1"
av1 "github.com/mikkeloscar/kube-aws-iam-controller/pkg/apis/zalando.org/v1"
fakeAWS "github.com/mikkeloscar/kube-aws-iam-controller/pkg/client/clientset/versioned/fake"
"github.com/mikkeloscar/kube-aws-iam-controller/pkg/clientset"
"github.com/stretchr/testify/require"
Expand All @@ -17,7 +17,7 @@ import (
func TestIsOwnedReference(t *testing.T) {
owner := av1.AWSIAMRole{
TypeMeta: metav1.TypeMeta{
APIVersion: "amazonaws.com/v1",
APIVersion: "zalando.org/v1",
Kind: "AWSIAMRole",
},
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -152,7 +152,7 @@ func TestRefreshAWSIAMRole(tt *testing.T) {
client := clientset.NewClientset(kubeClient, awsKubeClient)

for _, role := range tc.awsIAMRoles {
_, err := client.AmazonawsV1().AWSIAMRoles("default").Create(&role)
_, err := client.ZalandoV1().AWSIAMRoles("default").Create(&role)
require.NoError(t, err)
}

Expand Down
4 changes: 2 additions & 2 deletions docs/aws_iam_role_crd.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: awsiamroles.amazonaws.com
name: awsiamroles.zalando.org
spec:
group: amazonaws.com
group: zalando.org
version: v1
scope: Namespaced
names:
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment_with_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
secret:
secretName: kube-aws-iam-controller-iam-role # name of the AWSIAMRole resource
---
apiVersion: amazonaws.com/v1
apiVersion: zalando.org/v1
kind: AWSIAMRole
metadata:
name: kube-aws-iam-controller-iam-role
Expand Down
2 changes: 1 addition & 1 deletion docs/example-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
secret:
secretName: my-app-iam-role # name of the AWSIAMRole resource
---
apiVersion: amazonaws.com/v1
apiVersion: zalando.org/v1
kind: AWSIAMRole
metadata:
name: my-app-iam-role
Expand Down
2 changes: 1 addition & 1 deletion docs/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
name: kube-aws-iam-controller
rules:
- apiGroups:
- "amazonaws.com"
- "zalando.org"
resources:
- awsiamroles
- awsiamroles/status
Expand Down
6 changes: 3 additions & 3 deletions docs/sdk-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
secret:
secretName: aws-iam-java-example # name of the AWSIAMRole resource
---
apiVersion: amazonaws.com/v1
apiVersion: zalando.org/v1
kind: AWSIAMRole
metadata:
name: aws-iam-java-example
Expand Down Expand Up @@ -112,7 +112,7 @@ spec:
secret:
secretName: aws-iam-python-example # name of the AWSIAMRole resource
---
apiVersion: amazonaws.com/v1
apiVersion: zalando.org/v1
kind: AWSIAMRole
metadata:
name: aws-iam-python-example
Expand Down Expand Up @@ -181,7 +181,7 @@ spec:
secret:
secretName: aws-iam-golang-example # name of the AWSIAMRole resource
---
apiVersion: amazonaws.com/v1
apiVersion: zalando.org/v1
kind: AWSIAMRole
metadata:
name: aws-iam-golang-example
Expand Down
2 changes: 1 addition & 1 deletion hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set -o pipefail

SRC="github.com"
GOPKG="$SRC/mikkeloscar/kube-aws-iam-controller"
CUSTOM_RESOURCE_NAME="amazonaws.com"
CUSTOM_RESOURCE_NAME="zalando.org"
CUSTOM_RESOURCE_VERSION="v1"

SCRIPT_ROOT="$(dirname "${BASH_SOURCE[0]}")/.."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package amazonaws
package zalando

const (
// GroupName is the group name used in this package.
GroupName = "amazonaws.com"
GroupName = "zalando.org"
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1

import (
amazonaws "github.com/mikkeloscar/kube-aws-iam-controller/pkg/apis/amazonaws.com"
zalando "github.com/mikkeloscar/kube-aws-iam-controller/pkg/apis/zalando.org"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand All @@ -15,7 +15,7 @@ var (
)

// SchemeGroupVersion is the group version used to register these objects.
var SchemeGroupVersion = schema.GroupVersion{Group: amazonaws.GroupName, Version: "v1"}
var SchemeGroupVersion = schema.GroupVersion{Group: zalando.GroupName, Version: "v1"}

// Resource takes an unqualified resource and returns a Group-qualified GroupResource.
func Resource(resource string) schema.GroupResource {
Expand Down
File renamed without changes.
26 changes: 13 additions & 13 deletions pkg/client/clientset/versioned/clientset.go

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

16 changes: 8 additions & 8 deletions pkg/client/clientset/versioned/fake/clientset_generated.go

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

4 changes: 2 additions & 2 deletions pkg/client/clientset/versioned/fake/register.go

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

4 changes: 2 additions & 2 deletions pkg/client/clientset/versioned/scheme/register.go

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

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

Loading

0 comments on commit c9b2869

Please sign in to comment.