Skip to content

Commit

Permalink
Merge pull request #60 from akartsky/namespace_scope
Browse files Browse the repository at this point in the history
Namespace scope service controllers
  • Loading branch information
jaypipes authored May 14, 2021
2 parents d63e230 + 7e7aff2 commit cba1bea
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/aws-controllers-k8s/code-generator
go 1.14

require (
github.com/aws-controllers-k8s/runtime v0.1.0
github.com/aws-controllers-k8s/runtime v0.2.0
github.com/aws/aws-sdk-go v1.37.4
github.com/dlclark/regexp2 v1.4.0
// pin to v0.1.1 due to release problem with v0.1.2
Expand Down
1 change: 1 addition & 0 deletions templates/cmd/controller/main.go.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func main() {
MetricsBindAddress: ackCfg.MetricsAddr,
LeaderElection: ackCfg.EnableLeaderElection,
LeaderElectionID: awsServiceAPIGroup,
Namespace: ackCfg.WatchNamespace,
})
if err != nil {
setupLog.Error(
Expand Down
2 changes: 2 additions & 0 deletions templates/config/controller/deployment.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ spec:
- "$(ACK_LOG_LEVEL)"
- --resource-tags
- "$(ACK_RESOURCE_TAGS)"
- --watch-namespace
- "$(ACK_WATCH_NAMESPACE)"
image: controller:latest
name: controller
ports:
Expand Down
4 changes: 4 additions & 0 deletions templates/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ spec:
- "$(ACK_LOG_LEVEL)"
- --resource-tags
- "$(ACK_RESOURCE_TAGS)"
- --watch-namespace
- "$(ACK_WATCH_NAMESPACE)"
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
name: controller
ports:
Expand All @@ -60,6 +62,8 @@ spec:
fieldPath: metadata.namespace
- name: AWS_REGION
value: {{ .Values.aws.region }}
- name: ACK_WATCH_NAMESPACE
value: {{ .Values.watchNamespace }}
- name: ACK_RESOURCE_TAGS
value: {{ join "," .Values.resourceTags | quote }}
terminationGracePeriodSeconds: 10
3 changes: 3 additions & 0 deletions templates/helm/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ aws:
# If specified, use the AWS region for AWS API calls
region: ""

# If specified, the service controller will watch for object creation only in the provided namespace
watchNamespace: ""

resourceTags:
# Configures the ACK service controller to always set key/value pairs tags on resources that it manages.
- services.k8s.aws/managed=true
Expand Down

0 comments on commit cba1bea

Please sign in to comment.