This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
forked from cloudtruth/kubetruth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvalues.yaml
183 lines (159 loc) · 5.44 KB
/
values.yaml
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
171
172
173
174
175
176
177
178
179
180
181
182
183
# Default values for kubetruth.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: cloudtruth/kubetruth
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
rbac:
# Specifies whether RBAC resources should be created
create: true
clusterInstall: true
roleRules:
- apiGroups: [ "" ]
resources: [ "configmaps" ]
verbs: [ "*" ]
- apiGroups: [ "" ]
resources: [ "secrets" ]
verbs: [ "*" ]
- apiGroups: [ "" ]
resources: [ "namespaces" ]
verbs: [ "get", "list", "create" ]
- apiGroups: [ "kubetruth.cloudtruth.com" ]
resources: [ "projectmappings" ]
verbs: [ "*" ]
additionalRoleRules: []
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity: {}
appSettings:
apiKey:
apiUrl:
pollingInterval:
debug: false
# Create instances of the ProjectMapping CRD. A single mapping with scope=root
# is required (named root below). You can also add multiple override mappings
# (scope=override). Any properties not overriden are inherited from the root
# mapping. An example override mapping could look like:
#
# my-override-name:
# scope: "override"
# project_selector: "common"
# skip: true
#
projectMappings:
root:
scope: "root"
environment: "default"
project_selector: "^(?!kubetruth)"
context:
resource_name: "{{ project | dns_safe }}"
resource_namespace: "{{ mapping_namespace }}"
skip_secrets: false
resource_templates:
configmap: |
{%- if parameters.size > 0 %}
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ context.resource_name }}"
namespace: "{{ context.resource_namespace }}"
labels:
version: "{{ parameters | sort | to_json | sha256 | slice: 0, 7 }}"
annotations:
kubetruth/project_heirarchy: |
{{ project_heirarchy | to_yaml | indent: 6 | lstrip }}
kubetruth/parameter_origins: |
{{ parameter_origins | to_yaml | indent: 6 | lstrip }}
data:
{%- for parameter in parameters %}
{{ parameter[0] | key_safe | stringify }}: {{ parameter[1] | stringify }}
{%- endfor %}
{%- endif %}
secret: |
{%- unless context.skip_secrets or secrets.size == 0 %}
apiVersion: v1
kind: Secret
metadata:
name: "{{ context.resource_name }}"
namespace: "{{ context.resource_namespace }}"
labels:
version: "{{ secrets | sort | to_json | sha256 | slice: 0, 7 }}"
annotations:
kubetruth/project_heirarchy: |
{{ project_heirarchy | to_yaml | indent: 6 | lstrip }}
kubetruth/parameter_origins: |
{{ secret_origins | to_yaml | indent: 6 | lstrip }}
data:
{%- for secret in secrets %}
{{ secret[0] | key_safe | stringify }}: {{ secret[1] | encode64 | stringify }}
{%- endfor %}
{%- endunless %}
webcontrol:
scope: "override"
project_selector: "^kubetruth$"
skip: true
suppress_namespace_inheritance: true
resource_templates:
# Creates kubetruth CRDs from templates in the 'kubetruth' project in CloudTruth
# Templates are treated as a yaml hash for the spec section of the CRD and optionally with a namespace in its name like 'myNamespace/myProjectMappingName'
# You can fully specify a template (complete k8s yaml) by indicating it is raw with the directive "#~ format: raw" as the first line in the template
crds: |
{%- for template in templates.names %}
{%- assign is_raw_template = templates[template] | re_contains: "^\s*#\~\s*format:\s*raw" %}
{%- if is_raw_template %}
{{ templates[template] }}
{%- else %}
{%- assign name_parts = template | split: "/" %}
{%- assign name = name_parts | last %}
apiVersion: kubetruth.cloudtruth.com/v1
kind: ProjectMapping
metadata:
name: "{{ name }}"
{%- if name_parts.size > 1 %}
namespace: "{{ name_parts | first }}"
{%- endif %}
spec: {{ templates[template] | nindent: 2 }}
{%- endif %}
{% unless forloop.last %}---{% endunless %}
{%- endfor %}