Skip to content

Commit

Permalink
chore(k8s): remove unused _system symbol in config
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Jun 10, 2019
1 parent 19d9a13 commit a124d31
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion garden-service/src/plugins/kubernetes/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,4 @@ export const configSchema = kubernetesConfigBase
.allow("nginx", false, null)
.default(false)
.description("Set this to `nginx` to install/enable the NGINX ingress controller."),
_system: Joi.any().meta({ internal: true }),
})
3 changes: 0 additions & 3 deletions garden-service/src/plugins/kubernetes/local/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { ContainerRegistryConfig } from "../../container/config"
const supportedContexts = ["docker-for-desktop", "microk8s", "minikube"]

export interface LocalKubernetesConfig extends KubernetesBaseConfig {
_system?: Symbol
setupIngressController: string | null
}

Expand All @@ -42,7 +41,6 @@ export const configSchema = kubernetesConfigBase
.allow("nginx", false, null)
.default("nginx")
.description("Set this to null or false to skip installing/enabling the `nginx` ingress controller."),
_system: Joi.any().meta({ internal: true }),
})
.description("The provider configuration for the local-kubernetes plugin.")

Expand Down Expand Up @@ -145,7 +143,6 @@ export async function configureProvider({ config, log, projectName }: ConfigureP
storage: config.storage,
setupIngressController: config.setupIngressController,
tlsCertificates: config.tlsCertificates,
_system: config._system,
_systemServices,
}

Expand Down
7 changes: 1 addition & 6 deletions garden-service/src/plugins/kubernetes/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ const GARDEN_VERSION = getPackageVersion()
const SYSTEM_NAMESPACE_MIN_VERSION = "0.9.0"

const systemProjectPath = join(STATIC_DIR, "kubernetes", "system")
export const systemSymbol = Symbol()

export const systemNamespace = "garden-system"
export const systemMetadataNamespace = "garden-system--metadata"

export function isSystemGarden(provider: KubernetesProvider): boolean {
return provider.config._system === systemSymbol
}

export async function getSystemGarden(provider: KubernetesProvider, variables: PrimitiveMap): Promise<Garden> {
return Garden.factory(systemProjectPath, {
environmentName: "default",
Expand All @@ -54,7 +50,6 @@ export async function getSystemGarden(provider: KubernetesProvider, variables: P
name: "local-kubernetes",
context: provider.config.context,
namespace: systemNamespace,
_system: systemSymbol,
_systemServices: [],
},
],
Expand Down

0 comments on commit a124d31

Please sign in to comment.