Skip to content

Commit

Permalink
Merge pull request #34 from takutakahashi/add_aws_backend
Browse files Browse the repository at this point in the history
fix for dedicated container
  • Loading branch information
takutakahashi committed May 18, 2020
2 parents dd19a5a + f9267ff commit a65c3cc
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/manager .
COPY src/ src/
USER nonroot:nonroot

ENTRYPOINT ["/manager"]
28 changes: 28 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@ metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- delete
- get
- list
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- delete
- get
- list
- patch
- watch
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- delete
- get
- list
- apiGroups:
- loadbalancer.takutakahashi.dev
resources:
Expand Down
3 changes: 3 additions & 0 deletions controllers/awsbackend_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ type AWSBackendReconciler struct {

// +kubebuilder:rbac:groups=loadbalancer.takutakahashi.dev,resources=awsbackends,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=loadbalancer.takutakahashi.dev,resources=awsbackends/status,verbs=get;update;patch
// +kubebuilder:rbac:groups="",resources=pods,verbs=get;list;delete;patch;watch
// +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;create;delete
// +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;delete;patch

func (r *AWSBackendReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
ctx := context.Background()
Expand Down

0 comments on commit a65c3cc

Please sign in to comment.