Skip to content

Commit

Permalink
Modifying examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi-anand committed Oct 7, 2021
1 parent 112e59b commit abf0ff4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 142 deletions.
111 changes: 0 additions & 111 deletions examples/config/cluster/cluster-eks-dev-2.yaml

This file was deleted.

16 changes: 7 additions & 9 deletions examples/config/cluster/cluster-eks-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ profiles:
name: EKS-Base
packs:
- name: kubernetes-eks
version: 1.20
version: "1.20"
override_type: params #[values, params, template]
params:
OIDC_IDENTITY_PROVIDER_NAME: eks-oidc # parameter value in cluster profile pack values should be "%OIDC_IDENTITY_PROVIDER_NAME%"
Expand Down Expand Up @@ -39,17 +39,15 @@ profiles:
image: nginx:1.14.2
ports:
- containerPort: 80
- name: profile-installation
- name: install-application
is_manifest_pack: true
manifest_name: profile-install-crd
manifest_name: install-app-crd
override_type: template
params: # cluster profile pack value/manifest content will be repeated as many times map of params is specified
- NAMESPACE_NAME: namespace-cluster-10
NAMESPACE_LABEL_KEY: app
NAMESPACE_LABEL_VALUE: cluster1
- NAMESPACE_NAME: namespace-cluster-2
NAMESPACE_LABEL_KEY: app
NAMESPACE_LABEL_VALUE: cluster2
- PROFILE_NAME: small-app
PROFILE_SPEC_NAME: small-app
- PROFILE_NAME: security-app
PROFILE_SPEC_NAME: security-app
addons:
- name: profile_addon
cloud_config:
Expand Down
15 changes: 6 additions & 9 deletions examples/config/profile/profile-infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,10 @@ packs:
manifests:
- name: install-app-crd
content: |
apiVersion: v1
kind: Namespace
apiVersion: ehl.ees/v1
kind: ProfileInstallation
metadata:
name: sc-system
- name: install-app-config
content: |
apiVersion: v1
kind: Namespace
metadata:
name: sc-system-config
name: "%PROFILE_NAME%"
spec:
name: "%PROFILE_SPEC_NAME%"
---
24 changes: 11 additions & 13 deletions examples/mod_spectro_org.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
locals {
accounts_params = { ACCOUNT_DEV_NAME = "ehs-dev-030", ACCOUNT_PROD_NAME = "ehs-stg-004" }

bsl_params = { BSL_NAME = "qa-sharma" }
bsl_params = { BSL_NAME = "qa-sharma" }

profile_params = {
SPECTRO_REPO_URL = "https://registry.spectrocloud.com",
Expand All @@ -30,11 +30,11 @@ locals {
}

module "SpectroOrg" {
source = "github.com/spectrocloud/terraform-spectrocloud-modules"
sc_host = "" #e.g: api.spectrocloud.com (for SaaS)
sc_username = "" #e.g: [email protected]
sc_password = "" #e.g: supereSecure1!
sc_project_name = "" #e.g: Default
source = "../"
sc_host = "api.stage.spectrocloud.com" #e.g: api.spectrocloud.com (for SaaS)
sc_username = "[email protected]" #e.g: [email protected]
sc_password = "welcome2Spectr0!1" #e.g: supereSecure1!
sc_project_name = "Default" #e.g: Default

/*accounts = tomap({
for k, v in module.fetcher_accounts.object_files :
Expand All @@ -53,7 +53,7 @@ module "SpectroOrg" {

profiles = {
for k in fileset("config/profile", "profile-*.yaml") :
trimsuffix(k, ".yaml") => yamldecode(templatefile("config/profile/${k}", local.profile_params))
trimsuffix(k, ".yaml") => yamldecode(templatefile("config/profile/${k}", local.profile_params))
}

projects ={
Expand All @@ -66,10 +66,8 @@ module "SpectroOrg" {
trimsuffix(k, ".yaml") => yamldecode(templatefile("config/project/${k}", {}))
}

/*clusters = tomap({
for k, v in toset([
"cluster-eks-test.yaml",
]) :
k => yamldecode(file(join("", [local.clusters_folder, "/${k}"])))
})*/
clusters = {
for k in fileset("config/cluster", "team-*.yaml") :
trimsuffix(k, ".yaml") => yamldecode(templatefile("config/project/${k}", {}))
}
}

0 comments on commit abf0ff4

Please sign in to comment.