io.burkard.cdk.services.eks.ServiceAccount.scala Maven / Gradle / Ivy
The newest version!
package io.burkard.cdk.services.eks
import scala.collection.JavaConverters._
@scala.annotation.nowarn("cat=deprecation")
@SuppressWarnings(Array("org.wartremover.warts.DefaultArguments", "org.wartremover.warts.Null", "DisableSyntax.null"))
object ServiceAccount {
def apply(
internalResourceId: String,
cluster: software.amazon.awscdk.services.eks.ICluster,
name: Option[String] = None,
annotations: Option[Map[String, String]] = None,
labels: Option[Map[String, String]] = None,
namespace: Option[String] = None
)(implicit stackCtx: software.amazon.awscdk.Stack): software.amazon.awscdk.services.eks.ServiceAccount =
software.amazon.awscdk.services.eks.ServiceAccount.Builder
.create(stackCtx, internalResourceId)
.cluster(cluster)
.name(name.orNull)
.annotations(annotations.map(_.asJava).orNull)
.labels(labels.map(_.asJava).orNull)
.namespace(namespace.orNull)
.build()
}