diff --git a/class/defaults.yml b/class/defaults.yml index 823f484c..eaeff1bd 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -1,6 +1,7 @@ parameters: argocd: namespace: syn + distribution: ${facts:distribution} monitoring: enabled: true dashboards: false diff --git a/component/redis.jsonnet b/component/redis.jsonnet index b850dbd3..d7872f95 100644 --- a/component/redis.jsonnet +++ b/component/redis.jsonnet @@ -9,7 +9,7 @@ local role_binding = std.parseJson(kap.yaml_load('argocd/manifests/' + params.gi local serviceaccount = std.parseJson(kap.yaml_load('argocd/manifests/' + params.git_tag + '/redis/argocd-redis-sa.yaml')); local service = std.parseJson(kap.yaml_load('argocd/manifests/' + params.git_tag + '/redis/argocd-redis-service.yaml')); -local isOnOpenshift = std.startsWith(inv.parameters.facts.distribution, 'openshift'); +local isOnOpenshift = std.startsWith(params.distribution, 'openshift'); local redisContainerSpec(image) = { diff --git a/component/repo-server.jsonnet b/component/repo-server.jsonnet index 9eaf4d4d..615117c3 100644 --- a/component/repo-server.jsonnet +++ b/component/repo-server.jsonnet @@ -5,7 +5,7 @@ local inv = kap.inventory(); local params = inv.parameters.argocd; local image = params.images.argocd.image + ':' + params.images.argocd.tag; -local isOpenshift = std.startsWith(inv.parameters.facts.distribution, 'openshift'); +local isOpenshift = std.startsWith(params.distribution, 'openshift'); local deployment = std.parseJson(kap.yaml_load('argocd/manifests/' + params.git_tag + '/repo-server/argocd-repo-server-deployment.yaml')); local service = std.parseJson(kap.yaml_load('argocd/manifests/' + params.git_tag + '/repo-server/argocd-repo-server-service.yaml')); local vault_agent_config = kube.ConfigMap('vault-agent-config') { diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index 33a67fd9..beb74cfc 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -11,6 +11,14 @@ default:: `syn` The namespace in which to deploy this component. +== `distribution` + +[horizontal] +type:: string +default:: ${facts:distribution} + +The Kubernetes distribution of the cluster. + == `git_tag` [horizontal]