Skip to content

Commit

Permalink
fix: refactor service_account logic (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbr0ck3r committed Feb 8, 2024
1 parent 0b35b68 commit 9b06c43
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ local all = {
},
},
spec+: {
serviceAccountName: $.svc_acct.metadata.name,
priorityClassName: 'high-priority',
containers_:: {
default: ok.Container(app.name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ local all = {
},
},
spec+: {
serviceAccountName: $.svc_acct.metadata.name,
priorityClassName: 'high-priority',
containers_:: {
default: ok.Container(app.name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ local all = {
},
},
spec+: {
serviceAccountName: $.svc_acct.metadata.name,
priorityClassName: 'high-priority',
containers_:: {
default: ok.Container(app.name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ local all = {
},
},
spec+: {
serviceAccountName: $.svc_acct.metadata.name,
priorityClassName: 'high-priority',
containers_:: {
default: ok.Container(app.name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local all = {
labels+: sharedLabels,
},
},
svc_acct: ok.ServiceAccount('%s-svc' % app.name, app.namespace) {
svc_acct+: ok.ServiceAccount('%s-svc' % app.name, app.namespace) {
metadata+: {
labels+: sharedLabels,
annotations+: {
Expand Down Expand Up @@ -161,6 +161,7 @@ local all = {
},
},
spec+: {
serviceAccountName: $.svc_acct.metadata.name,
priorityClassName: 'high-priority',
containers_:: {
default: ok.Container(app.name) {
Expand Down
3 changes: 2 additions & 1 deletion templates/deployments/appname/app.jsonnet.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ local all = {
},
},
{{- if not (stencil.Arg "aws.useKIAM") }}
svc_acct: ok.ServiceAccount('%s-svc' % app.name, app.namespace) {
svc_acct+: ok.ServiceAccount('%s-svc' % app.name, app.namespace) {
metadata+: {
labels+: sharedLabels,
annotations+: {
Expand Down Expand Up @@ -269,6 +269,7 @@ local all = {
},
},
spec+: {
serviceAccountName: $.svc_acct.metadata.name,
priorityClassName: 'high-priority',
containers_:: {
default: ok.Container(app.name) {
Expand Down

0 comments on commit 9b06c43

Please sign in to comment.