Editing configuration for the Flexera Kubernetes Inventory Agent
generate.sh
to help you define these
resources in a YAML file, if you wish to use it. Alternatively, you may prefer to edit
the YAML file in your preferred text editor. This topic provides extra detail about
attributes specified in the YAML file, in case you want to delve deeper in your
customization. kind
attribute. This attribute defines the kind or type of object declared in this
YAML file. In our case, the object is the Flexera Kubernetes Inventory Agent, expressed in
this declaration as:kind: KRM
Here, KRM
should be read as "Kubernetes resource monitor", referring directly to
the Flexera Kubernetes Inventory Agent, for which the declarations are made in the YAML
file. In other places, you may find "KRM" used as a quick reference to the
Kubernetes Resource Model, so we will try to avoid confusion.DaemonSet
to ensure that
exactly one instance runs on each node. Therefore be sure that in each cluster, you
have only one YAML file of resource declarations for an application/object of:
kind: KRM
However, if you have multiple clusters
needing to share the same configuration details for Flexera Kubernetes Inventory Agent, you
may copy the same YAML file to each of those clusters (but remember to check for a
unique URL for the inventory beacon to be used within each cluster), and use
it while running the install.sh
script for each different cluster.
IT Asset Management (Cloud)
Current
Basic structural elements
kind
attribute, declaring the kind or type of resource that is
being defined. Together, these preamble elements are called the
GroupVersionKind
(GVK). The following GVK is mandatory in every
YAML file defining the Flexera Kubernetes Inventory Agent:apiVersion: agents.flexera.com/v1
kind: KRM
metadata
block, which typically identifies
the name of the object to which this YAML file applies. In this case, the
metadata
block does not have a namespace
attribute, because the KRM kind
(for the Flexera Kubernetes Inventory Agent)
is cluster scoped (applies to the entire Kubernetes cluster within which it
is defined).metadata:
name: instance
spec
block, and
in the YAML file for the Flexera Kubernetes Inventory Agent, these attributes are grouped in
three places:- Top-level attributes are entered directly in the
spec
block - Attributes for the monitor component (the part of the Flexera Kubernetes Inventory Agent that tracks the creation and removal of containers for other
applications) are grouped in a
monitor
block that is a child of thespec
block - Attributes for the node component (the part that collects hardware inventory
from the Kubernetes working nodes, the physical or virtual computers running
within the cluster) are grouped in a
node
block that is a child of thespec
block.
apiVersion: agents.flexera.com/v1
kind: KRM
metadata:
name: instance
spec:
monitor:
beaconURL: https://beacon.example.org
storage:
storageClass: default
resources:
requests:
storage: 2Gi
To
save space, attributes in following documentation are described with a dot-separated
path, such as the following for the beaconURL
mandatory
attribute:Attribute | spec.monitor.beaconURL |
Type | String |
Example | https://beacon.example.org |
spec
block, and
within that find the monitor
block, and within that find [or add]
the required attribute (in this case beaconURL
."Optional configuration attributes
Container image registry
By default, the registry from which the container image is pulled is based on the registry component of the controller's image. The controller's image has its registry set either:- In the operator configuration, or
- During the installation process.
Attribute | spec.image.registry |
Type | String |
Example | registry.example.org |
Image version
By default, the version of the agent container image is based on the version of the controller's image. The controller's image has its version set either:- In the operator configuration, or
- During the installation process.
Attribute | spec.image.version |
Type | String |
Example | 1.0.0 |
Pull an Image from a private registry
When using your own internal registry, you can add the appropriate pointers to the authentication secrets here. These will be propagated to the pods containing Flexera Kubernetes Inventory Agent. EachLocalObjectReference
in
the array is on its own line and is of the
form: - name: thisSecretName
(Notice that this attribute
sits within the top level spec
block.) Attribute | spec.imagePullSecrets |
Type |
Array of LocalObjectReference |
Configuring a cluster name
spec
block.)
Attribute | spec.clusterName |
Type |
String |
Example |
|
Flexera Kubernetes Inventory Agent logging level
Specify a logging level, using one of the following case-sensitive strings:trace
debug
info
(the default value)warn
error
.
spec
block, in which case it applies to all components of
Flexera Kubernetes Inventory Agent; or it can be set on each of the components
individually. Component-level settings override top-level settings. The
trace
setting produces a high volume of logging information.
Levels above info
such as warn
and
error
are not recommended, as these levels make
troubleshooting issues considerably more difficult. Attribute |
|
Type | String |
Example | Info |
Include/exclude namespaces
TheincludeNamespaces
and excludeNamespaces
attributes give you granular control over what resources are visible to the Flexera Kubernetes Inventory Agent by controlling which namespaces are permitted. excludeNamespaces
— By default this is empty. The Flexera Kubernetes Inventory Agent ignores any namespace that appears in the list, including the namespace itself and all of the resources it contains.includeNamespaces
— By default this is empty. If the list is not empty, the Flexera Kubernetes Inventory Agent interprets the list as a complete and exclusive list of all the namespaces it is permitted to observe. Any namespace not included in the list is ignored, just as if it were included in the alternativeexcludeNamespaces
attribute.
Attribute |
|
Type | Array of strings |
Example | ["kube-system", "test"] |
Include/exclude labels
Like the namespace-based filtering mechanisms above, these attributes allow fine-grained control over what resources are observed by the Flexera Kubernetes Inventory Agent, except that the filtering is based on labels applied to resources.excludeLabels
— By default this is empty. The Flexera Kubernetes Inventory Agent ignores any resource that bears any of the labels specified here.includeLabels
— By default this is empty. If the this attribute is not empty, the Flexera Kubernetes Inventory Agent ignores any resource that does not bear at least one of its labels.
ReplicaSet
, or Deployment
,
for example), in order to determine whether any of the resource's parents have an
operative label. krm.flexera.com/ignore
. Any resource that
bears this label key (and in this case, the value is irrelevant) automatically
acts as if it were filtered by excludeLabels
, and the Flexera Kubernetes Inventory Agent does not continue to observe it.Attribute |
|
Type | Key-value pairs, separated by a colon, each on its own line |
Example |
|
apiVersion: agents.flexera.com/v1
kind: KRM
metadata:
name: instance
spec:
monitor:
excludeLabels:
environment: testing
app: particular-app
Managing patches to config.ini
configmap
, and this setting
configures the Flexera Kubernetes Inventory Agent to reference that
configmap
by the name you chose to create for it (in this
example, "agent-config
").Attribute | spec.monitor.configPatch |
Type |
A ConfigMapVolumeSource,
a Kubernetes type that describes how a
|
Example |
|
Referencing a Secret
secret
,
storage that shares the life of the pod. For example, if you wish to store
custom certificate(s) used to authenticate HTTPS communications between the
Flexera Kubernetes Inventory Agent and its registered inventory beacon, you
might store those certificate(s) in a secret
that you choose to
name, say, myorg-certificates
. (For details about setting up
the certificate and the secret
, see Supporting Custom Certificates for HTTPS.) Once the certificate is
safely stored in a volume within the cluster, you may configure the Flexera Kubernetes Inventory Agent to reference that volume through the secret
using the spec.monitor.tlsFiles
attribute.Attribute | spec.monitor.tlsFiles |
Type |
A VolumeSource type
called a |
Example |
|
Extensions
Reserved for future development, intended to support faster delivery of features. Theextensions
attribute is a mapping of a string key to a
LocalObjectReference
that refers to a
ConfigMap
in the cluster. Attribute | spec.extensions |
Type |
Key: value pairs, relating a string key to a LocalObjectReference value |