Merge pull request #87 from Nashluffy/patch-1

Added clusterRole, clusterRoleBinding, and SA to metallb module
This commit is contained in:
Carlos Eduardo 2020-08-17 15:08:58 -03:00 committed by GitHub
commit d00fff6e7a
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.withLabels({ 'k8s-app': 'metallb-controller' }) +
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),
},
}