All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.digital.integration.server.common.domain.profiles.OperatorHelmProfile.kt Maven / Gradle / Ivy

There is a newer version: 23.3.0-1025.941
Show newest version
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)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy