Added clusterRole, clusterRoleBinding, and SA to metallb module

This commit is contained in:
Nash Luffman 2020-08-16 00:46:50 -04:00 committed by GitHub
parent e7c456f380
commit 264569f215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,5 +24,24 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
service.mixin.metadata.withNamespace('metallb-system') + service.mixin.metadata.withNamespace('metallb-system') +
service.mixin.metadata.withLabels({ 'k8s-app': 'metallb-controller' }) + service.mixin.metadata.withLabels({ 'k8s-app': 'metallb-controller' }) +
service.mixin.spec.withClusterIp('None'), service.mixin.spec.withClusterIp('None'),
clusterRole:
utils.newClusterRole('metallb-exporter', [
{
apis: [''],
res: ['services', 'endpoints', 'pods'],
verbs: ['get', 'list', 'watch'],
},
], null),
serviceAccount:
utils.newServiceAccount('metallb-exporter', $._config.namespace, null),
clusterRoleBinding:
utils.newClusterRoleBinding('metallb-exporter', 'metallb-exporter', $._config.namespace, 'metallb-exporter', null),
}, },
} }