Skip to content

Commit

Permalink
chore: re-use constant instead of hardcoded domain string (#5177)
Browse files Browse the repository at this point in the history
  • Loading branch information
shumailxyz authored Oct 4, 2023
1 parent 7357d30 commit 6cf0bd8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/plugins/kubernetes/ephemeral/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { ConfigureProviderParams } from "../../../plugin/handlers/Provider/confi
import { dedent } from "../../../util/string"
import { KubernetesConfig, namespaceSchema } from "../config"
import { EPHEMERAL_KUBERNETES_PROVIDER_NAME } from "./ephemeral"
import { DEFAULT_GARDEN_CLOUD_DOMAIN } from "../../../constants"

export const configSchema = () =>
providerConfigBaseSchema()
Expand Down Expand Up @@ -52,7 +53,7 @@ export async function configureProvider(params: ConfigureProviderParams<Kubernet
message: `You are not logged in. You must be logged into Garden Cloud in order to use ${EPHEMERAL_KUBERNETES_PROVIDER_NAME} provider.`,
})
}
if (ctx.cloudApi && ctx.cloudApi?.domain !== "https://app.garden.io") {
if (ctx.cloudApi && ctx.cloudApi?.domain !== DEFAULT_GARDEN_CLOUD_DOMAIN) {
throw new ConfigurationError({
message: `${EPHEMERAL_KUBERNETES_PROVIDER_NAME} provider is currently not supported for ${ctx.cloudApi.distroName}.`,
})
Expand Down

0 comments on commit 6cf0bd8

Please sign in to comment.