Class Manifests.ManifestObject
java.lang.Object
com.google.jenkins.plugins.k8sengine.Manifests.ManifestObject
- Enclosing class:
- Manifests
ManifestObject wrapper that encapsulates an object spec loaded from a supplied manifest.
-
Constructor Summary
ConstructorsConstructorDescriptionManifestObject
(Map<String, Object> source, FilePath file) Build the manifest object from source. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the specified label key and value to thisManifests.ManifestObject
's metadata labels.describe()
getFile()
getKind()
getName()
Ensures thisManifests.ManifestObject
has labels, modifying in-place as needed, finally returning the labels.
-
Constructor Details
-
ManifestObject
Build the manifest object from source.- Parameters:
source
- The YAML map source for the object.file
- The file containing the manifest.
-
-
Method Details
-
getFile
- Returns:
- The file containing this manifest.
-
getSource
- Returns:
- The YAML map source for the object.
-
getApiVersion
- Returns:
- The apiVersion.
-
getKind
- Returns:
- The kind.
-
getName
- Returns:
- The name.
-
getOrCreateLabels
Ensures thisManifests.ManifestObject
has labels, modifying in-place as needed, finally returning the labels.- Returns:
- The labels for this
Manifests.ManifestObject
.
-
addLabel
Adds the specified label key and value to thisManifests.ManifestObject
's metadata labels. Will ensure a label map exists upon execution.- Parameters:
key
- The key of the label to be added.value
- The value of the label to be added.
-
describe
- Returns:
- The description of the object in {ApiVersion}/{Kind}: {Name}
-