Class KubernetesManifestNamer

java.lang.Object
com.netflix.spinnaker.clouddriver.kubernetes.names.KubernetesManifestNamer
All Implemented Interfaces:
com.netflix.spinnaker.clouddriver.names.NamingStrategy<KubernetesManifest>, com.netflix.spinnaker.moniker.Namer<KubernetesManifest>

@Component public class KubernetesManifestNamer extends Object implements com.netflix.spinnaker.clouddriver.names.NamingStrategy<KubernetesManifest>
  • Constructor Details

    • KubernetesManifestNamer

      @Autowired public KubernetesManifestNamer(@Value("${kubernetes.v2.apply-app-labels:true}") boolean applyAppLabels, @Value("${kubernetes.v2.managed-by-suffix:}") String managedBySuffix)
    • KubernetesManifestNamer

      public KubernetesManifestNamer()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface com.netflix.spinnaker.clouddriver.names.NamingStrategy<KubernetesManifest>
    • applyMoniker

      public void applyMoniker(KubernetesManifest obj, com.netflix.spinnaker.moniker.Moniker moniker)
      Specified by:
      applyMoniker in interface com.netflix.spinnaker.moniker.Namer<KubernetesManifest>
    • applyMoniker

      public void applyMoniker(KubernetesManifest obj, com.netflix.spinnaker.moniker.Moniker moniker, com.netflix.spinnaker.orchestration.OperationDescription description)
      Applies the given Moniker to the specified KubernetesManifest. If the provided OperationDescription is an instance of KubernetesDeployManifestDescription, the method will annotate and label the manifest. If KubernetesDeployManifestDescription.isSkipSpecTemplateLabels() is true, skip applying the Kubernetes and Moniker labels to the manifest's spec.template.metadata.labels. If the OperationDescription is null, or the KubernetesDeployManifestDescription.isSkipSpecTemplateLabels() is false, apply the Kubernetes and Moniker labels to the manifest's spec.template.metadata.labels
      Specified by:
      applyMoniker in interface com.netflix.spinnaker.moniker.Namer<KubernetesManifest>
      Parameters:
      obj - the KubernetesManifest to which the moniker will be applied
      moniker - the moniker to apply
      description - a description expected to be of type KubernetesDeployManifestDescription that provides context for the operation.
    • deriveMoniker

      public com.netflix.spinnaker.moniker.Moniker deriveMoniker(KubernetesManifest obj)
      Specified by:
      deriveMoniker in interface com.netflix.spinnaker.moniker.Namer<KubernetesManifest>