ai.digital.integration.server.common.domain.profiles.OperatorHelmProfile.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of integration-server-gradle-plugin Show documentation
Show all versions of integration-server-gradle-plugin Show documentation
The easy way to get custom setup for Deploy up and running
package ai.digital.integration.server.common.domain.profiles
import ai.digital.integration.server.common.domain.providers.*
import org.gradle.api.Action
import org.gradle.api.Project
import org.gradle.api.tasks.Input
import org.gradle.kotlin.dsl.container
import org.gradle.kotlin.dsl.newInstance
import org.gradle.kotlin.dsl.property
@Suppress("UnstableApiUsage")
abstract class OperatorHelmProfile (name: String, project: Project) : Profile {
@Input
val deploymentTimeoutSeconds = project.objects.property().value(900)
@Input
val activeProviderName = project.objects.property()
@Input
val namespace = project.objects.property()
@Input
val ingressType = project.objects.property().value(IngressType.NGINX.name)
@Input
val doCleanup = project.objects.property().value(true)
@Input
val deploySuffix = project.objects.property()
val awsOpenshift: AwsOpenshiftProvider =
DefaultProviderContainer(project.container(Provider::class) {
project.objects.newInstance(AwsOpenshiftProvider::class, project)
}, project).awsOpenshift()
fun awsOpenshift(action: Action) {
action.execute(awsOpenshift)
}
val awsEks: AwsEksProvider =
DefaultProviderContainer(project.container(Provider::class) {
project.objects.newInstance(AwsEksProvider::class, project)
}, project).awsEks()
fun awsEks(action: Action) = action.execute(awsEks)
val azureAks: AzureAksProvider =
DefaultProviderContainer(project.container(Provider::class) {
project.objects.newInstance(AzureAksProvider::class, project)
}, project).azureAks()
fun azureAks(action: Action) = action.execute(azureAks)
val gcpGke: GcpGkeProvider =
DefaultProviderContainer(project.container(Provider::class) {
project.objects.newInstance(GcpGkeProvider::class, project)
}, project).gcpGke()
fun gcpGke(action: Action) = action.execute(gcpGke)
val onPremise: OnPremiseProvider =
DefaultProviderContainer(project.container(Provider::class) {
project.objects.newInstance(OnPremiseProvider::class, project)
}, project).onPremise()
fun onPremise(action: Action) = action.execute(onPremise)
val vmwareOpenshift: VmwareOpenshiftProvider =
DefaultProviderContainer(project.container(Provider::class) {
project.objects.newInstance(VmwareOpenshiftProvider::class, project)
}, project).vmwareOpenshift()
fun vmwareOpenshift(action: Action) = action.execute(vmwareOpenshift)
}