Skip to content

Commit

Permalink
feat(argus-5.6.0): release charts argus 5.6.0 (#96)
Browse files Browse the repository at this point in the history
Co-authored-by: Shubhashri Shirode <[email protected]>
  • Loading branch information
shubhashri12 and lmshubhashri authored May 10, 2023
1 parent 8b10c9e commit fac00a1
Show file tree
Hide file tree
Showing 5 changed files with 276 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/argus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ maintainers:
- email: [email protected]
name: LogicMonitor
name: argus
version: 5.5.0
version: 5.6.0
home: https://logicmonitor.github.io/helm-charts
appVersion: v10.5.0
dependencies:
Expand Down
23 changes: 23 additions & 0 deletions charts/argus/templates/_collector.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,29 @@ runAsNonRoot: false
{{- end }}
{{- end }}

{{- define "argus.collector-affinity" }}
{{ if .Values.collector.affinity }}
{{- toYaml .Values.collector.affinity | nindent 4 }}
{{ else if not .Values.collector.allowMultipleCollectorsOnNode }}
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: collectorset
app.kubernetes.io/instance: {{ include "lmutil.fullname" . }}
topologyKey: kubernetes.io/hostname
{{ else }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 50
podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/name: collectorset
app.kubernetes.io/instance: {{ include "lmutil.fullname" . }}
topologyKey : kubernetes.io/hostname
{{ end }}
{{- end }}

{{- define "argus.collector-default-container-sec-context-nonroot" }}
{{- if eq (include "lmutil.is-openshift" .) "true" }}
Expand Down
1 change: 1 addition & 0 deletions charts/argus/templates/collectorset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ spec:
{{- end }}
probe: {{ toYaml .Values.collector.probe | nindent 4 }}
collectorConfigMapName: {{ include "lmutil.fullname" . }}-collector
affinity: {{ include "argus.collector-affinity" . | nindent 4 }}
securityContext: {{ include "argus.collector-container-sec-context-nonroot" (list . "argus.custom-collector-container-sec-context-nonroot") | nindent 4 }}
podSecurityContext: {{ include "argus.collector-pod-sec-context-nonroot" (list . "argus.custom-collector-pod-sec-context-nonroot") | nindent 4 }}
249 changes: 249 additions & 0 deletions charts/argus/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2175,6 +2175,12 @@
"type": "boolean",
"default": false
},
"allowMultipleCollectorsOnNode": {
"$comment": "tf:optional",
"$id": "#/properties/collector/properties/multipleCollectorsOnNode",
"type": "boolean",
"default": true
},
"collectorConf": {
"$id": "#/properties/collector/properties/collectorConf",
"$comment": "tf:optional",
Expand All @@ -2198,6 +2204,10 @@
"podSecurityContext": {
"$id": "#/properties/collector/properties/podSecurityContext",
"$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext"
},
"affinity": {
"$id": "#/properties/collector/properties/affinity",
"$ref": "#/definitions/io.k8s.api.core.v1.Affinity"
}
},
"additionalProperties": false
Expand Down Expand Up @@ -2933,6 +2943,245 @@
}
},
"type": "object"
},
"io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement": {
"required": [
"key",
"operator"
],
"description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
"properties": {
"operator": {
"description": "operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.",
"type": "string"
},
"values": {
"items": {
"type": "string"
},
"description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.",
"type": "array"
},
"key": {
"description": "key is the label key that the selector applies to.",
"type": "string"
}
},
"type": "object"
},
"io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector": {
"description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.",
"properties": {
"matchLabels": {
"additionalProperties": {
"type": "string"
},
"description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
"type": "object"
},
"matchExpressions": {
"items": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement"
},
"description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
"type": "array"
}
},
"type": "object"
},
"io.k8s.kubernetes.pkg.api.v1.WeightedPodAffinityTerm": {
"required": [
"weight",
"podAffinityTerm"
],
"description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)",
"properties": {
"podAffinityTerm": {
"description": "Required. A pod affinity term, associated with the corresponding weight.",
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.PodAffinityTerm"
},
"weight": {
"type": "integer",
"description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.",
"format": "int32"
}
},
"type": "object"
},
"io.k8s.kubernetes.pkg.api.v1.PodAffinityTerm": {
"required": [
"topologyKey"
],
"description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> tches that of any node on which a pod of the set of pods is running",
"properties": {
"labelSelector": {
"description": "A label query over a set of resources, in this case pods.",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
},
"namespaces": {
"items": {
"type": "string"
},
"description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"",
"type": "array"
},
"topologyKey": {
"type": "string",
"description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed."
},
"namespaceSelector": {
"description": "A label query over a set of resources, in this case pods.",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
}
},
"type": "object"
},
"io.k8s.api.core.v1.NodeSelectorRequirement": {
"description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
"properties": {
"key": {
"description": "The label key that the selector applies to.",
"type": "string"
},
"operator": {
"description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
"type": "string"
},
"values": {
"description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"key",
"operator"
],
"type": "object"
},
"io.k8s.api.core.v1.NodeSelectorTerm": {
"description": "A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.",
"properties": {
"matchExpressions": {
"description": "A list of node selector requirements by node's labels.",
"items": {
"$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorRequirement"
},
"type": "array"
},
"matchFields": {
"description": "A list of node selector requirements by node's fields.",
"items": {
"$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorRequirement"
},
"type": "array"
}
},
"type": "object",
"x-kubernetes-map-type": "atomic"
},
"io.k8s.api.core.v1.PreferredSchedulingTerm": {
"description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).",
"properties": {
"preference": {
"$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorTerm",
"description": "A node selector term, associated with the corresponding weight."
},
"weight": {
"description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.",
"format": "int32",
"type": "integer"
}
},
"required": [
"weight",
"preference"
],
"type": "object"
},
"io.k8s.api.core.v1.NodeSelector": {
"description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.",
"properties": {
"nodeSelectorTerms": {
"description": "Required. A list of node selector terms. The terms are ORed.",
"items": {
"$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorTerm"
},
"type": "array"
}
},
"required": [
"nodeSelectorTerms"
],
"type": "object"
},
"io.k8s.api.core.v1.NodeAffinity": {
"description": "Node affinity is a group of node affinity scheduling rules.",
"properties": {
"preferredDuringSchedulingIgnoredDuringExecution": {
"description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.",
"items": {
"$ref": "#/definitions/io.k8s.api.core.v1.PreferredSchedulingTerm"
},
"type": "array"
},
"requiredDuringSchedulingIgnoredDuringExecution": {
"$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector",
"description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node."
}
},
"type": "object"
},
"io.k8s.api.core.v1.Affinity": {
"properties": {
"nodeAffinity": {
"$ref": "#/definitions/io.k8s.api.core.v1.NodeAffinity",
"description": "Describes node affinity scheduling rules for the pod."
},
"podAffinity": {
"description": "Pod affinity is a group of inter pod affinity scheduling rules.",
"properties": {
"requiredDuringSchedulingIgnoredDuringExecution": {
"description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.",
"items": {
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.PodAffinityTerm"
},
"type": "array"
},
"preferredDuringSchedulingIgnoredDuringExecution": {
"description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.",
"items": {
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.WeightedPodAffinityTerm"
},
"type": "array"
}
},
"type": "object"
},
"podAntiAffinity": {
"description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.",
"properties": {
"requiredDuringSchedulingIgnoredDuringExecution": {
"items": {
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.PodAffinityTerm"
},
"type": "array",
"description": "If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied."
},
"preferredDuringSchedulingIgnoredDuringExecution": {
"items": {
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.WeightedPodAffinityTerm"
},
"type": "array",
"description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred."
}
},
"type": "object"
}
},
"type": "object"
}
}
}
2 changes: 2 additions & 0 deletions charts/argus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ collector:
add: []
drop: []
podSecurityContext: {}
affinity: {}
allowMultipleCollectorsOnNode: true
disableLightweightCollector: false
# collector application configuration such as agent.conf
collectorConf:
Expand Down

0 comments on commit fac00a1

Please sign in to comment.