Created
April 26, 2019 10:55
-
-
Save skinny/6636f7f6cae0ecbde55c14129042d8b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local kap = import 'lib/kapitan.libjsonnet'; | |
local kube = import 'lib/kube.libjsonnet'; | |
local inv = kap.inventory(); | |
local name = 'redis-ha'; | |
local replicas = 3; | |
local statefulset = import "./components/redis/statefulset.jsonnet"; | |
local announcer = import "./components/redis/announce-service.jsonnet"; | |
{ | |
'00_serviceaccount': kube.ServiceAccount('redis-ha'), | |
'01_rbac': kube.List() + { | |
items: [ | |
kube.Role('redis-ha') + { | |
rules: [ | |
{ | |
apiGroups: [''], | |
resources: ['endpoints'], | |
verbs: ['get'], | |
}, | |
], | |
}, | |
kube.RoleBinding('redis-ha') + { | |
roleRef: { | |
name: 'redis-ha', | |
kind: 'Role', | |
apiGroup: 'rbac.authorization.k8s.io', | |
}, | |
subjects: { | |
kind: 'ServiceAccount', | |
name: 'redis-ha' | |
}, | |
}, | |
], | |
} | |
} + statefulset.RedisStatefulSet(name, replicas) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment