Skip to content

Commit

Permalink
Merge branch 'release/3.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Oct 21, 2024
2 parents 1a3e3d9 + c8f343f commit 1aa7014
Show file tree
Hide file tree
Showing 52 changed files with 1,592 additions and 519 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")
#@ load("educates.lib.yaml", "copy_all_educates_values")
#@ load("educates.lib.yaml", "copy_core_educates_values")

#! This copies user provided values for the custom infrastructure provider.
#! This copies only core Educates values.

#! #@overlay/match-child-defaults missing_ok=True
#! clusterPackages:
#! educates:
#! settings: #@ copy_all_educates_values()
#@overlay/match-child-defaults missing_ok=True
clusterPackages:
educates:
settings: #@ copy_core_educates_values()
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ clusterPackages:
kapp-controller:
#@ if/end hasattr(data.values, "clusterPackages") and hasattr(data.values.clusterPackages, "kapp-controller") and hasattr(data.values.clusterPackages["kapp-controller"], "settings"):
settings: #@ data.values.clusterPackages["kapp-controller"].settings

#@overlay/merge
educates:
#@ if/end hasattr(data.values, "clusterPackages") and hasattr(data.values.clusterPackages, "educates") and hasattr(data.values.clusterPackages["educates"], "settings"):
#@ if/end hasattr(data.values, "clusterPackages") and hasattr(data.values.clusterPackages, "educates") and hasattr(data.values.clusterPackages["educates"], "settings") and data.values.clusterPackages["educates"].settings:
settings: #@ data.values.clusterPackages["educates"].settings
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,16 @@ lookupService:
#@ if/end hasattr(data.values.lookupService, "ingressPrefix") and data.values.lookupService.ingressPrefix != None:
ingressPrefix: #@ data.values.lookupService.ingressPrefix
#@ end

#@ def copy_core_educates_values():
#@ if/end hasattr(data.values, "imageRegistry") and data.values.imageRegistry != None:
imageRegistry:
#@ if/end hasattr(data.values.imageRegistry, "namespace") and data.values.imageRegistry.namespace != None:
namespace: #@ data.values.imageRegistry.namespace
#@ if/end hasattr(data.values.imageRegistry, "host") and data.values.imageRegistry.host != None:
host: #@ data.values.imageRegistry.host
#@ if/end hasattr(data.values, "version") and data.values.version != None:
version: #@ data.values.version
#@ if/end hasattr(data.values, "imageVersions") and data.values.imageVersions != None:
imageVersions: #@ data.values.imageVersions
#@ end
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ clusterPackages:
aws:
args:
domain_filter: #@ data.values.clusterInfrastructure.aws.route53.hostedZone if hasattr(data.values.clusterInfrastructure.aws.route53, "hostedZone") else data.values.clusterIngress.domain
txt_owner_id: "educates"
txt_owner_id: #@ data.values.clusterIngress.domain
policy: sync
certs:
enabled: #@ isClusterPackageEnableByDefault("certs")
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ clusterPackages:
args:
project: #@ data.values.clusterInfrastructure.gcp.project
domain_filter: #@ data.values.clusterInfrastructure.gcp.cloudDNS.zone if hasattr(data.values.clusterInfrastructure.gcp.cloudDNS, "zone") else data.values.clusterIngress.domain
txt_owner_id: "educates"
txt_owner_id: #@ data.values.clusterIngress.domain
policy: sync
certs:
enabled: #@ isClusterPackageEnableByDefault("certs")
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
#@overlay/match-child-defaults missing_ok=True
clusterPackages:
educates:
#@ if/end isClusterPackageExplicitDisabled("educates"):
#@ if isClusterPackageExplicitDisabled("educates"):
#@overlay/replace
settings: {}
enabled: false
#@overlay/replace
settings: {}
#@ end
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")

#@overlay/remove
debug:

#@overlay/remove
localKindCluster:
#@overlay/remove
localDNSResolver:

#@overlay/remove
clusterInfrastructure:

#@overlay/remove
imageRegistry:
#@overlay/remove
version:
#@overlay/remove
imageVersions:
#@overlay/remove
clusterRuntime:
#@overlay/remove
clusterIngress:
#@overlay/remove
sessionCookies:
#@overlay/remove
clusterStorage:
#@overlay/remove
clusterSecrets:
#@overlay/remove
clusterSecurity:
#@overlay/remove
workshopSecurity:
#@overlay/remove
trainingPortal:
#@overlay/remove
dockerDaemon:
#@overlay/remove
clusterNetwork:
#@overlay/remove
workshopAnalytics:
#@overlay/remove
websiteStyling:
#@overlay/remove
imagePuller:
#@overlay/remove
lookupService:
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")
#@ load("functions.star", "isClusterPackageEnableByDefault")

#! This file contains default values for the custom infrastructure provider.
#! These are the values that will be set if not overridden by the user.

#@overlay/match-child-defaults missing_ok=True
#@overlay/replace
clusterPackages:
contour:
enabled: #@ isClusterPackageEnableByDefault("contour")
settings:
infraProvider: minikube
contour:
replicas: 1
configFileContents:
defaultHttpVersions:
- "HTTP/1.1"
service:
type: ClusterIP
useHostPorts: true
cert-manager:
enabled: #@ isClusterPackageEnableByDefault("cert-manager")
settings: {}
external-dns:
enabled: #@ isClusterPackageEnableByDefault("external-dns")
settings: {}
certs:
enabled: #@ isClusterPackageEnableByDefault("certs")
settings: {}
kyverno:
enabled: #@ isClusterPackageEnableByDefault("kyverno")
settings: {}
kapp-controller:
enabled: #@ isClusterPackageEnableByDefault("kapp-controller")
settings: {}
educates:
enabled: #@ isClusterPackageEnableByDefault("educates")
settings: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")

#! This enables packages based on the user input

#@overlay/match-child-defaults missing_ok=True
clusterPackages:
contour:
#@ if/end hasattr(data.values, "clusterPackages") and hasattr(data.values.clusterPackages, "contour") and hasattr(data.values.clusterPackages.contour, "enabled"):
enabled: #@ data.values.clusterPackages.contour.enabled
kyverno:
#@ if/end hasattr(data.values, "clusterPackages") and hasattr(data.values.clusterPackages, "kyverno") and hasattr(data.values.clusterPackages.kyverno, "enabled"):
enabled: #@ data.values.clusterPackages.kyverno.enabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")
#@ load("educates.lib.yaml", "copy_all_educates_values")

#! This copies user provided values for the custom infrastructure provider.

#@overlay/match-child-defaults missing_ok=True
clusterPackages:
educates:
settings: #@ copy_all_educates_values()
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")
#@ load("functions.star", "isClusterPackageExplicitDisabled")

#! This removes settings for disabled packages

#@overlay/match-child-defaults missing_ok=True
clusterPackages:
contour:
#@ if/end isClusterPackageExplicitDisabled("contour"):
#@overlay/replace
settings: {}
cert-manager:
#@ if/end isClusterPackageExplicitDisabled("cert-manager"):
#@overlay/replace
settings: {}
external-dns:
#@ if/end isClusterPackageExplicitDisabled("external-dns"):
#@overlay/replace
settings: {}
certs:
#@ if/end isClusterPackageExplicitDisabled("certs"):
#@overlay/replace
settings: {}
kyverno:
#@ if/end isClusterPackageExplicitDisabled("kyverno"):
#@overlay/replace
settings: {}
kapp-controller:
#@ if/end isClusterPackageExplicitDisabled("kapp-controller"):
#@overlay/replace
settings: {}
#! educates:
#! #@ if/end isClusterPackageExplicitDisabled("educates"):
#! #@overlay/replace
#! settings: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# minikube
By default, contour, kyverno and educates will be installed
We only allow to enabling/disabling contour and kyverno
We copy all educates main config to the clusterPackage
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
load("@ytt:data", "data")

enabledByDefaultPackagesList = [
"contour",
"kyverno",
"educates"
]
Loading

0 comments on commit 1aa7014

Please sign in to comment.