-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from oracle-quickstart/daemonset
Add DaemonSet deployment support
- Loading branch information
Showing
13 changed files
with
253 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright (c) 2024, Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "mgmt-agent.resourceNamePrefix" . }}-agent | ||
namespace: {{ include "mgmt-agent.namespace" . }} | ||
data: | ||
emd.properties: | | ||
# provide the key=value pair below to override |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (c) 2024, Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "mgmt-agent.resourceNamePrefix" . }}-env | ||
namespace: {{ include "mgmt-agent.namespace" . }} | ||
data: | ||
# Unmodifiable properties | ||
# Please do not remove/modify the below properties | ||
DAEMONSET_DEPLOYMENT: "{{ .Values.deployment.daemonSetDeployment }}" | ||
HELM_DEPLOYMENT: "true" | ||
INSTALL_NAMESPACE: "{{ include "mgmt-agent.namespace" . }}" | ||
{{- if .Values.deployment.cleanupEpochTime }} | ||
POD_CLEANUP_ID: "{{ .Values.deployment.cleanupEpochTime }}" | ||
{{- end }} | ||
|
||
# Modifiable properties | ||
# Add new or change the below existing properties as required |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Copyright (c) 2024, Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
{{- if .Values.deployment.daemonSetDeployment }} | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent | ||
namespace: {{ include "mgmt-agent.namespace" . }} | ||
labels: | ||
app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/metrics-configmap: {{ include (print $.Template.BasePath "/metrics-configmap.yaml") . | sha256sum }} | ||
checksum/agent-configmap: {{ include (print $.Template.BasePath "/agent-configmap.yaml") . | sha256sum }} | ||
checksum/env-configmap: {{ include (print $.Template.BasePath "/env-configmap.yaml") . | sha256sum }} | ||
labels: | ||
app: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent | ||
spec: | ||
securityContext: | ||
runAsUser: {{ default 0 .Values.deployment.security.runAsUser }} | ||
runAsGroup: {{ default 0 .Values.deployment.security.runAsGroup }} | ||
fsGroup: {{ default 0 .Values.deployment.security.fsGroup }} | ||
serviceAccountName: {{ include "mgmt-agent.serviceAccount" . }} | ||
{{- if .Values.mgmtagent.image.secret }} | ||
imagePullSecrets: | ||
- name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent-container-registry-key | ||
{{- end }} | ||
restartPolicy: Always | ||
containers: | ||
- name: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent | ||
image: {{ .Values.mgmtagent.image.url }} | ||
envFrom: | ||
- configMapRef: | ||
name: {{ include "mgmt-agent.resourceNamePrefix" . }}-env | ||
resources: | ||
requests: | ||
cpu: {{ .Values.deployment.resource.request.cpuCore }} | ||
memory: {{ .Values.deployment.resource.request.memory }} | ||
limits: | ||
cpu: {{ .Values.deployment.resource.limit.cpuCore }} | ||
memory: {{ .Values.deployment.resource.limit.memory }} | ||
volumeMounts: | ||
- name: mgmtagent-secret | ||
mountPath: /opt/oracle/mgmtagent_secret | ||
readOnly: true | ||
- name: mgmtagent-hostpath | ||
mountPath: /opt/oracle | ||
- name: mgmtagent-config | ||
mountPath: /opt/oracle/mgmtagent_config | ||
- name: mgmtagent-env | ||
mountPath: /opt/oracle/mgmtagent_env | ||
- name: mgmtagent-agent-config | ||
mountPath: /opt/oracle/mgmtagent_agent_config | ||
- mountPath: /tmp | ||
name: tmp | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
readOnlyRootFilesystem: true | ||
volumes: | ||
- name: mgmtagent-secret | ||
secret: | ||
secretName: {{ include "mgmt-agent.resourceNamePrefix" . }}-mgmt-agent-rsp | ||
- name: mgmtagent-config | ||
configMap: | ||
name: {{ include "mgmt-agent.resourceNamePrefix" . }}-metrics | ||
- name: mgmtagent-env | ||
configMap: | ||
name: {{ include "mgmt-agent.resourceNamePrefix" . }}-env | ||
- name: mgmtagent-agent-config | ||
configMap: | ||
name: {{ include "mgmt-agent.resourceNamePrefix" . }}-agent | ||
- name: mgmtagent-hostpath | ||
hostPath: | ||
path: {{ required "deployment.daemonSet.hostPath is required" .Values.deployment.daemonSet.hostPath }} | ||
- emptyDir: {} | ||
name: tmp | ||
{{- end }} |
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
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
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
Oops, something went wrong.