Class ConfigMapVolumeSource

  • All Implemented Interfaces:
    com.marcnuri.yakc.model.ListModel<KeyToPath>, com.marcnuri.yakc.model.Model

    public class ConfigMapVolumeSource
    extends java.lang.Object
    implements com.marcnuri.yakc.model.Model, com.marcnuri.yakc.model.ListModel<KeyToPath>
    Adapts a ConfigMap into a volume.


    The contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ConfigMapVolumeSource.Builder builder()  
      protected boolean canEqual​(java.lang.Object other)  
      boolean equals​(java.lang.Object o)  
      java.lang.Number getDefaultMode()
      defaultMode is optional: mode bits used to set permissions on created files by default.
      java.util.List<KeyToPath> getItems()
      items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value.
      java.lang.String getName()
      Name of the referent.
      java.lang.Boolean getOptional()
      optional specify whether the ConfigMap or its keys must be defined
      int hashCode()  
      void setDefaultMode​(java.lang.Number defaultMode)
      defaultMode is optional: mode bits used to set permissions on created files by default.
      void setItems​(java.util.List<KeyToPath> items)
      items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value.
      void setName​(java.lang.String name)
      Name of the referent.
      void setOptional​(java.lang.Boolean optional)
      optional specify whether the ConfigMap or its keys must be defined
      ConfigMapVolumeSource.Builder toBuilder()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ConfigMapVolumeSource

        public ConfigMapVolumeSource​(java.lang.Number defaultMode,
                                     java.util.List<KeyToPath> items,
                                     java.lang.String name,
                                     java.lang.Boolean optional)
      • ConfigMapVolumeSource

        public ConfigMapVolumeSource()
    • Method Detail

      • getDefaultMode

        public java.lang.Number getDefaultMode()
        defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
      • getItems

        public java.util.List<KeyToPath> getItems()
        items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
        Specified by:
        getItems in interface com.marcnuri.yakc.model.ListModel<KeyToPath>
      • getName

        public java.lang.String getName()
        Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
      • getOptional

        public java.lang.Boolean getOptional()
        optional specify whether the ConfigMap or its keys must be defined
      • setDefaultMode

        public void setDefaultMode​(java.lang.Number defaultMode)
        defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
      • setItems

        public void setItems​(java.util.List<KeyToPath> items)
        items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
      • setName

        public void setName​(java.lang.String name)
        Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
      • setOptional

        public void setOptional​(java.lang.Boolean optional)
        optional specify whether the ConfigMap or its keys must be defined
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object