Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if semverCompare "<1.19-0" .Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version }}
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (ne .Values.omsagent.secret.key "<your_workspace_key>") (ne .Values.omsagent.secret.wsid "<your_workspace_id>") (or (ne .Values.omsagent.env.clusterName "<your_cluster_name>") (ne .Values.omsagent.env.clusterId "<your_cluster_id>"))}}
{{- if and (ne .Values.omsagent.secret.key "<your_workspace_key>") (ne .Values.omsagent.secret.wsid "<your_workspace_id>") (or (ne .Values.omsagent.env.clusterName "<your_cluster_name>") (ne .Values.omsagent.env.clusterId "<your_cluster_id>") (ne .Values.Azure.Cluster.ResourceId "<your_cluster_id>") )}}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down Expand Up @@ -32,7 +32,7 @@ spec:
options:
- name: ndots
value: "3"
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.Version }}
nodeSelector:
kubernetes.io/os: windows
{{- else }}
Expand Down
10 changes: 9 additions & 1 deletion charts/azuremonitor-containers/templates/omsagent-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ metadata:
heritage: {{ .Release.Service }}
---
kind: ClusterRole
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }}
apiVersion: rbac.authorization.k8s.io/v1
{{- else }}
apiVersion: rbac.authorization.k8s.io/v1beta1
{{- end }}
metadata:
name: omsagent-reader
labels:
Expand All @@ -33,7 +37,7 @@ rules:
verbs: ["get", "create", "patch"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
#arc k8s extension model grants access as part of the extension msi
#arc k8s extension model grants access as part of the extension msi
#remove this explicit permission once the extension available in public preview
{{- if (empty .Values.Azure.Extension.Name) }}
- apiGroups: [""]
Expand All @@ -43,7 +47,11 @@ rules:
{{- end }}
---
kind: ClusterRoleBinding
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }}
apiVersion: rbac.authorization.k8s.io/v1
{{- else }}
apiVersion: rbac.authorization.k8s.io/v1beta1
{{- end }}
metadata:
name: omsagentclusterrolebinding
labels:
Expand Down