-
Notifications
You must be signed in to change notification settings - Fork 1
/
role-manifest.yml
170 lines (169 loc) · 5.5 KB
/
role-manifest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
instance_groups:
- name: nats # The name of the role
jobs: # BOSH jobs this role will have
- name: global-properties
release: scf-helper
- name: bpm
release: bpm
- name: nats
release: nats # The name of the BOSH release this is from
properties:
bosh_containerization:
run: # Runtime configuration
scaling: # Auto-scaling limits
min: 1
max: 3
capabilities: [ALL]
memory: 256 # Memory request for each instance (MB)
virtual-cpus: 4 # CPU request for each instance
ports:
- name: nats
protocol: TCP # TCP or UDP
external: 4333 # Port visible outside the container
internal: 4333 # Port inside the container
public: true # Whether to expose to outside the cluster
- name: nats-routes
protocol: TCP
internal: 4334
public: false
tags:
- sequential-startup
- name: secret-generation
type: bosh-task
jobs:
- name: generate-secrets
release: scf-helper
properties:
bosh_containerization:
run:
scaling:
min: 1
max: 1
flight-stage: pre-flight
capabilities: []
memory: 256
virtual-cpus: 1
service-account: secret-generator
configuration:
templates:
properties.scf.secrets.cert_expiration: ((CERT_EXPIRATION))
properties.scf.secrets.cluster_domain: ((KUBERNETES_CLUSTER_DOMAIN))
properties.scf.secrets.domain: ((DOMAIN))
properties.scf.secrets.generation: ((KUBE_SECRETS_GENERATION_COUNTER))
properties.scf.secrets.is_install: ((HELM_IS_INSTALL))
properties.scf.secrets.name: ((KUBE_SECRETS_GENERATION_NAME))
properties.scf.secrets.namespace: ((KUBERNETES_NAMESPACE))
configuration:
templates:
networks.default.dns_record_name: '"((DNS_RECORD_NAME))"'
networks.default.ip: '"((IP_ADDRESS))"'
properties.diego.rep.cell_id: '"((#MY_CERT))((/MY_CERT))"((cacert))((cacert_KEY)) ((MY_CERT_KEY))'
properties.fissile.monit.password: '"((MONIT_PASSWORD))"'
properties.nats.password: '"((NATS_PASSWORD))"'
properties.nats.user: '"((NATS_USER))"' # In BOSH templates, `p('nats.user')`
# we just need a BOSH release variable to use those
auth:
roles:
configgin-role:
- apiGroups: [""]
resources: [pods]
verbs: [get, list, patch]
- apiGroups: [""]
resources: [services]
verbs: [get]
- apiGroups: [apps]
resources: [statefulsets]
verbs: [get]
secrets-role:
- apiGroups: [""]
resources: [configmaps, secrets]
verbs: [create, get, list, patch, update, delete]
accounts:
default:
roles: [configgin-role]
secret-generator:
roles: [configgin-role, secrets-role]
variables:
- name: CERT_EXPIRATION
options:
description: Expiration for generated certificates (in days)
default: 10950
- name: DOMAIN
options:
example: my-scf-cluster.com
required: true
description: Base domain of the SCF cluster.
- name: HELM_IS_INSTALL
options:
description: >
This is an environment variable built-in by fissile.
It's set directly from the Release.IsInstall Helm property.
type: environment
- name: KUBERNETES_CLUSTER_DOMAIN
options:
description: >
The cluster domain used by Kubernetes.
If left empty, each container will try to determine the correct value based on /etc/resolv.conf
You can read more about it in the Kubernetes Documentation https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
example: cluster.local
type: environment
required: true
description: Base domain of the SCF cluster.
- name: KUBERNETES_NAMESPACE
options:
type: environment
description: >
The name of the kubernetes namespace all components will run in.
This parameter cannot be set by the user.
Its value is supplied by the kubernetes runtime.
description: Expiration for generated certificates (in days)
default: 10950
- name: KUBE_SECRETS_GENERATION_COUNTER
options:
type: environment
description: >
This is an environment variable built-in by fissile.
It's automatically set to the kube.secrets_generation_counter Helm value, which controls secret rotation.
- name: KUBE_SECRETS_GENERATION_NAME
options:
description: >
This is an environment variable built-in by fissile.
Its default value is 'secret-1' and cannot be set by the user.
type: environment
- name: MONIT_PASSWORD
type: password
options:
description: Password for monit
required: true
secret: true
- name: MY_CERT
type: certificate
options:
description: A certificate
secret: true
- name: MY_CERT_KEY
options:
description: Entry for accessing the key part of MY_CERT
type: environment
secret: true
- name: NATS_PASSWORD
type: password
options:
description: Password for NATS
secret: true
required: true
- name: NATS_USER
options:
description: User name for NATS
required: true
previous_names: [NATS_USR]
- name: cacert
type: certificate
options:
description: The default CA for certificates
is_ca: true
secret: true
- name: cacert_KEY
options:
description: Entry for accessing the key part of cacert
secret: true