diff --git a/.goreleaser.yml b/.goreleaser.yml index 1f5e7e1c8..574006485 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -5,7 +5,6 @@ project_name: aws-operator before: hooks: - make codegen - - make update-bindata # Builds the binary for each platform builds: @@ -43,7 +42,7 @@ release: # Creates a Docker container with the operator packaged into it for distribution dockers: -- image: christopherhein/aws-operator +- image: 915347744415.dkr.ecr.us-west-2.amazonaws.com/aws-operator binary: aws-operator dockerfile: Dockerfile tag_templates: diff --git a/Makefile b/Makefile index e8f9dc102..4ad7856dd 100644 --- a/Makefile +++ b/Makefile @@ -10,18 +10,10 @@ release: rm -fr dist goreleaser -.PHONY: install-bindata -install-bindata: - go get -u github.com/jteeuwen/go-bindata/... - .PHONY: install-aws-codegen install-aws-codegen: go get -u github.com/christopherhein/aws-operator-codegen -# .PHONY: update-bindata -# update-bindata: -# go generate ./pkg/cloudformation/ - .PHONY: aws-codegen aws-codegen: aws-operator-codegen process diff --git a/configs/aws-operator.yaml b/configs/aws-operator.yaml index 2415992ad..f511a1e4d 100644 --- a/configs/aws-operator.yaml +++ b/configs/aws-operator.yaml @@ -1,78 +1,92 @@ ---- -kind: Namespace apiVersion: v1 -metadata: - name: aws-operator ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1beta1 -metadata: - name: aws-operator - namespace: aws-operator -rules: -- apiGroups: - - extensions - resources: - - thirdpartyresources - verbs: - - get - - list - - watch - - create - - delete - - update -- apiGroups: - - apiextensions.k8s.io - resources: - - customresourcedefinitions - verbs: - - get - - list - - watch - - create - - delete -- apiGroups: - - operator.aws - resources: - - "*" - verbs: - - "*" ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: aws-operator - namespace: aws-operator ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1beta1 -metadata: - name: aws-operator - namespace: aws-operator -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: aws-operator -subjects: +kind: List +items: +- kind: Namespace + apiVersion: v1 + metadata: + name: aws-operator + +- kind: ClusterRole + apiVersion: rbac.authorization.k8s.io/v1beta1 + metadata: + name: aws-operator + namespace: aws-operator + rules: + - apiGroups: + - v1 + resources: + - secrets + - pods + - configmaps + - services + verbs: + - get + - list + - watch + - create + - delete + - update + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list + - watch + - create + - delete + - apiGroups: + - operator.aws + resources: + - "*" + verbs: + - "*" + - kind: ServiceAccount - name: aws-operator - namespace: default -# TODO: Uncomment when you have an image to deploy -# --- -# apiVersion: apps/v1beta1 -# kind: Deployment -# metadata: -# name: aws-operator -# namespace: aws-operator -# spec: -# replicas: 1 -# template: -# metadata: -# labels: -# app: aws-operator -# spec: -# serviceAccountName: aws-operator -# containers: -# - name: aws-operator -# image: christopherhein/aws-operator:VERSION_NUMBER -# imagePullPolicy: Always + apiVersion: v1 + metadata: + name: aws-operator + namespace: aws-operator + +- kind: ClusterRoleBinding + apiVersion: rbac.authorization.k8s.io/v1beta1 + metadata: + name: aws-operator + namespace: aws-operator + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: aws-operator + subjects: + - kind: ServiceAccount + name: aws-operator + namespace: default + +- kind: Deployment + apiVersion: apps/v1beta1 + metadata: + name: aws-operator + namespace: aws-operator + spec: + replicas: 1 + template: + metadata: + labels: + app: aws-operator + spec: + serviceAccountName: aws-operator + containers: + - name: aws-operator + image: .dkr.ecr.us-west-2.amazonaws.com/aws-operator:v0.0.1.alpha1 + imagePullPolicy: Always + env: + - name: AWS_ACCESS_KEY_ID + value: + - name: AWS_SECRET_ACCESS_KEY + value: + args: + - --cluster-name= + - --region= + - --bucket= + - --account-id=