Skip to content

Commit e1cb02d

Browse files
authored
Merge pull request #25 from prasebha/v3.0.0
sync agent changes for v3.0.0
2 parents d64ce00 + 5d5be4d commit e1cb02d

File tree

5 files changed

+271
-23
lines changed

5 files changed

+271
-23
lines changed

charts/mgmt-agent/templates/metric_server.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -142,28 +142,13 @@ spec:
142142
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
143143
- --kubelet-use-node-status-port
144144
- --metric-resolution=15s
145-
image: k8s.gcr.io/metrics-server/metrics-server:v0.6.1
145+
image: registry.k8s.io/metrics-server/metrics-server:v0.6.3
146146
imagePullPolicy: IfNotPresent
147-
livenessProbe:
148-
failureThreshold: 3
149-
httpGet:
150-
path: /livez
151-
port: https
152-
scheme: HTTPS
153-
periodSeconds: 10
154147
name: metrics-server
155148
ports:
156149
- containerPort: 4443
157150
name: https
158151
protocol: TCP
159-
readinessProbe:
160-
failureThreshold: 3
161-
httpGet:
162-
path: /readyz
163-
port: https
164-
scheme: HTTPS
165-
initialDelaySeconds: 20
166-
periodSeconds: 10
167152
resources:
168153
requests:
169154
cpu: 100m

charts/mgmt-agent/templates/mgmt-agent-statefulset.yaml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,24 @@ spec:
1919
labels:
2020
app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent
2121
spec:
22+
securityContext:
23+
runAsUser: {{ default 0 .Values.deployment.security.runAsUser }}
24+
runAsGroup: {{ default 0 .Values.deployment.security.runAsGroup }}
25+
fsGroup: {{ default 0 .Values.deployment.security.fsGroup }}
2226
serviceAccountName: {{ include "mgmt-agent.serviceAccount" . }}
2327
imagePullSecrets:
2428
- name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent-container-registry-key
2529
restartPolicy: Always
2630
containers:
2731
- name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent
2832
image: {{ .Values.mgmtagent.image.url }}
33+
resources:
34+
requests:
35+
cpu: {{ .Values.deployment.resource.request.cpuCore }}
36+
memory: {{ .Values.deployment.resource.request.memory }}
37+
limits:
38+
cpu: {{ .Values.deployment.resource.limit.cpuCore }}
39+
memory: {{ .Values.deployment.resource.limit.memory }}
2940
volumeMounts:
3041
- name: mgmtagent-secret
3142
mountPath: /opt/oracle/mgmtagent_secret
@@ -34,19 +45,28 @@ spec:
3445
mountPath: /opt/oracle
3546
- name: mgmtagent-config
3647
mountPath: /opt/oracle/mgmtagent_config
48+
- mountPath: /tmp
49+
name: tmp
50+
securityContext:
51+
allowPrivilegeEscalation: false
52+
readOnlyRootFilesystem: true
3753
volumes:
3854
- name: mgmtagent-secret
3955
secret:
4056
secretName: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent-rsp
4157
- name: mgmtagent-config
4258
configMap:
4359
name: {{ include "mgmt-agent.resourceNamePrefix" . }}-metrics
60+
- emptyDir: {}
61+
name: tmp
4462
volumeClaimTemplates:
4563
- metadata:
4664
name: mgmtagent-pvc
4765
spec:
4866
accessModes: [ "ReadWriteOnce" ]
49-
storageClassName: "oci-bv"
67+
{{- if .Values.deployment.storageClass }}
68+
storageClassName: {{ .Values.deployment.storageClass }}
69+
{{- end }}
5070
resources:
5171
requests:
52-
storage: 2Gi
72+
storage: {{ .Values.deployment.resource.request.storage }}
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
{
2+
"$schema": "https://json-schema.org/draft-07/schema#",
3+
"properties":
4+
{
5+
"global":
6+
{
7+
"properties":
8+
{
9+
"namespace":
10+
{
11+
"type": "string"
12+
},
13+
"resourceNamePrefix":
14+
{
15+
"type": "string"
16+
}
17+
},
18+
"required":
19+
[
20+
"namespace",
21+
"resourceNamePrefix"
22+
]
23+
},
24+
"mgmtagent":
25+
{
26+
"properties":
27+
{
28+
"installKeyFileContent":
29+
{
30+
"type":
31+
[
32+
"string",
33+
"null"
34+
]
35+
},
36+
"installKey":
37+
{
38+
"type":
39+
[
40+
"string",
41+
"null"
42+
]
43+
},
44+
"image":
45+
{
46+
"properties":
47+
{
48+
"url":
49+
{
50+
"type": "string"
51+
},
52+
"secret":
53+
{
54+
"type":
55+
[
56+
"string",
57+
"null"
58+
]
59+
}
60+
},
61+
"required":
62+
[
63+
"url"
64+
]
65+
}
66+
},
67+
"anyOf":
68+
[
69+
{
70+
"properties":
71+
{
72+
"installKeyFileContent":
73+
{
74+
"minLength": 0
75+
}
76+
},
77+
"required":
78+
[
79+
"installKey"
80+
]
81+
},
82+
{
83+
"properties":
84+
{
85+
"installKey":
86+
{
87+
"minLength": 0
88+
}
89+
},
90+
"required":
91+
[
92+
"installKeyFileContent"
93+
]
94+
}
95+
],
96+
"type": "object"
97+
},
98+
"namespace":
99+
{
100+
"type": "string"
101+
},
102+
"deployMetricServer":
103+
{
104+
"type": "boolean"
105+
},
106+
"kubernetesCluster":
107+
{
108+
"properties":
109+
{
110+
"name":
111+
{
112+
"type": "string"
113+
},
114+
"namespace":
115+
{
116+
"type": "string"
117+
}
118+
},
119+
"required":
120+
[
121+
"name",
122+
"namespace"
123+
]
124+
},
125+
"deployment":
126+
{
127+
"properties":
128+
{
129+
"security":
130+
{
131+
"properties":
132+
{
133+
"runAsUser":
134+
{
135+
"type":
136+
[
137+
"integer",
138+
"null"
139+
]
140+
},
141+
"runAsGroup":
142+
{
143+
"type":
144+
[
145+
"integer",
146+
"null"
147+
]
148+
},
149+
"fsGroup":
150+
{
151+
"type":
152+
[
153+
"integer",
154+
"null"
155+
]
156+
}
157+
}
158+
},
159+
"resource":
160+
{
161+
"properties":
162+
{
163+
"request":
164+
{
165+
"properties":
166+
{
167+
"cpuCore":
168+
{
169+
"type": "string"
170+
},
171+
"memory":
172+
{
173+
"type": "string"
174+
},
175+
"storage":
176+
{
177+
"type": "string"
178+
}
179+
},
180+
"required":
181+
[
182+
"cpuCore",
183+
"memory",
184+
"storage"
185+
]
186+
},
187+
"limit":
188+
{
189+
"properties":
190+
{
191+
"cpuCore":
192+
{
193+
"type": "string"
194+
},
195+
"memory":
196+
{
197+
"type": "string"
198+
}
199+
},
200+
"required":
201+
[
202+
"cpuCore",
203+
"memory"
204+
]
205+
}
206+
}
207+
}
208+
}
209+
}
210+
},
211+
"required":
212+
[
213+
"namespace"
214+
],
215+
"title": "Values",
216+
"type": "object"
217+
}

charts/mgmt-agent/values.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,32 @@ kubernetesCluster:
5050
name:
5151
# -- Kubernetes cluster namespace(s) to monitor. This can be a comma-separated list of namespaces or '*' to monitor all the namespaces
5252
namespace: '*'
53+
54+
deployment:
55+
security:
56+
# Processes in the Container will run as user ID 1000, replace it with a different value if desired
57+
runAsUser: 1000
58+
# Processes in the Container will use group ID 2000, replace it with a different value if desired
59+
runAsGroup: 2000
60+
# Files created in the Container will use group ID 2000, replace it with a different value if desired
61+
fsGroup: 2000
62+
63+
# Provide the agent resources as per Kubernetes resource quantity
64+
resource:
65+
# Provide the minimum required resources
66+
request:
67+
# specify the cpu cores
68+
cpuCore: 200m
69+
# specify the memory
70+
memory: 500Mi
71+
# specify the storage capacity for StatefulSet's PVC
72+
storage: 2Gi
73+
# Provide the maximum limit for resources
74+
limit:
75+
# specify the cpu cores
76+
cpuCore: 500m
77+
# specify the memory
78+
memory: 1Gi
79+
80+
# Provide the storage class for StatefulSet's PVC. If not provided then the Cluster's default storage class will be used.
81+
storageClass:

charts/oci-onm/values.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,11 @@ oci-onm-mgmt-agent:
4545
kubernetesCluster:
4646
name: "{{ .Values.global.kubernetesClusterName }}"
4747
mgmtagent:
48-
# Provide either installKeyFileContent or installKey as an install key. If both provided then installKeyFileContent will take higher precedence.
4948
# Provide the base64 encoded content of the Management Agent Install Key file
5049
installKeyFileContent:
51-
# Copy the downloaded Management Agent Install Key file under root helm directory as resources/input.rsp
52-
installKey: resources/input.rsp
5350
# Follow steps documented at https://github.com/oracle/docker-images/tree/main/OracleManagementAgent to build docker image.
5451
image:
5552
# Replace this value with actual docker image URL for Management Agent
56-
url:
53+
url: container-registry.oracle.com/oci_observability_management/oci-management-agent:1.0.0
5754
# Image secrets to use for pulling container image (base64 encoded content of ~/.docker/config.json file)
58-
secret:
55+
secret:

0 commit comments

Comments
 (0)