|
| 1 | +apiVersion: training.educates.dev/v1beta1 |
| 2 | +kind: Workshop |
| 3 | +metadata: |
| 4 | + name: "lab-authoring-environment" |
| 5 | +spec: |
| 6 | + title: "Authoring Environment" |
| 7 | + description: "A workshop on getting started with workshop authoring." |
| 8 | + publish: |
| 9 | + image: "$(image_repository)/labs-authoring-guides/lab-authoring-environment-files:$(workshop_version)" |
| 10 | + workshop: |
| 11 | + files: |
| 12 | + - image: |
| 13 | + url: "$(image_repository)/labs-authoring-guides/lab-authoring-environment-files:$(workshop_version)" |
| 14 | + includePaths: |
| 15 | + - /workshop/** |
| 16 | + - /exercises/** |
| 17 | + - /README.md |
| 18 | + packages: |
| 19 | + - name: educates |
| 20 | + files: |
| 21 | + - image: |
| 22 | + url: $(oci_image_cache)/educates-client-programs:3.0.0-alpha.12 |
| 23 | + path: bin |
| 24 | + includePaths: |
| 25 | + - educates-linux-$(platform_arch) |
| 26 | + session: |
| 27 | + namespaces: |
| 28 | + budget: x-large |
| 29 | + security: |
| 30 | + policy: baseline |
| 31 | + token: |
| 32 | + enabled: false |
| 33 | + applications: |
| 34 | + terminal: |
| 35 | + enabled: true |
| 36 | + layout: split |
| 37 | + editor: |
| 38 | + enabled: true |
| 39 | + console: |
| 40 | + enabled: false |
| 41 | + docker: |
| 42 | + enabled: true |
| 43 | + socket: |
| 44 | + enabled: false |
| 45 | + compose: |
| 46 | + services: |
| 47 | + registry: |
| 48 | + image: registry:2.8.3 |
| 49 | + ports: |
| 50 | + - "0.0.0.0:5001:5000" |
| 51 | + registry: |
| 52 | + enabled: false |
| 53 | + vcluster: |
| 54 | + enabled: false |
| 55 | + volumes: |
| 56 | + - name: admin-credentials-config |
| 57 | + secret: |
| 58 | + secretName: $(session_name)-kubeconfig |
| 59 | + volumeMounts: |
| 60 | + - name: admin-credentials-config |
| 61 | + mountPath: /opt/kubeconfig |
| 62 | + dashboards: |
| 63 | + - name: Docs |
| 64 | + url: https://docs.educates.dev/ |
| 65 | + objects: |
| 66 | + - apiVersion: v1 |
| 67 | + kind: Secret |
| 68 | + metadata: |
| 69 | + name: $(session_name)-admin-vcluster-values |
| 70 | + namespace: $(workshop_namespace) |
| 71 | + stringData: |
| 72 | + values.yaml: | |
| 73 | + vcluster: |
| 74 | + image: rancher/k3s:v1.25.3-k3s1 |
| 75 | + syncer: |
| 76 | + extraArgs: |
| 77 | + - --tls-san=admin-vcluster.$(session_namespace).svc.$(cluster_domain) |
| 78 | + - --out-kube-config-server=https://admin-vcluster.$(session_namespace).svc.$(cluster_domain) |
| 79 | + mapServices: |
| 80 | + fromHost: |
| 81 | + - from: $(workshop_namespace)/registry-$(session_name) |
| 82 | + to: default/registry |
| 83 | + - from: $(workshop_namespace)/localhost-$(session_name) |
| 84 | + to: default/loopback |
| 85 | + sync: |
| 86 | + ingresses: |
| 87 | + enabled: true |
| 88 | + - apiVersion: kappctrl.k14s.io/v1alpha1 |
| 89 | + kind: App |
| 90 | + metadata: |
| 91 | + name: $(session_name)-admin-vcluster-package |
| 92 | + namespace: $(workshop_namespace) |
| 93 | + spec: |
| 94 | + serviceAccountName: kapp-installer |
| 95 | + syncPeriod: 720h |
| 96 | + noopDelete: true |
| 97 | + fetch: |
| 98 | + - helmChart: |
| 99 | + name: vcluster |
| 100 | + repository: |
| 101 | + url: https://charts.loft.sh |
| 102 | + template: |
| 103 | + - helmTemplate: |
| 104 | + name: admin-vcluster |
| 105 | + namespace: $(session_namespace) |
| 106 | + valuesFrom: |
| 107 | + - secretRef: |
| 108 | + name: $(session_name)-admin-vcluster-values |
| 109 | + - ytt: |
| 110 | + inline: |
| 111 | + paths: |
| 112 | + overlays.yaml: | |
| 113 | + #@ load("@ytt:data", "data") |
| 114 | + #@ load("@ytt:overlay", "overlay") |
| 115 | + #@overlay/match by=overlay.all, expects="1+" |
| 116 | + --- |
| 117 | + metadata: |
| 118 | + #@overlay/match missing_ok=True |
| 119 | + ownerReferences: |
| 120 | + - apiVersion: training.educates.dev/v1beta1 |
| 121 | + kind: WorkshopSession |
| 122 | + blockOwnerDeletion: true |
| 123 | + controller: true |
| 124 | + name: $(session_name) |
| 125 | + uid: $(workshop_session_uid) |
| 126 | + deploy: |
| 127 | + - kapp: |
| 128 | + rawOptions: |
| 129 | + - --app-changes-max-to-keep=5 |
| 130 | + - apiVersion: secrets.educates.dev/v1beta1 |
| 131 | + kind: SecretCopier |
| 132 | + metadata: |
| 133 | + name: $(session_name)-kubeconfig |
| 134 | + spec: |
| 135 | + rules: |
| 136 | + - sourceSecret: |
| 137 | + name: vc-admin-vcluster |
| 138 | + namespace: $(session_namespace) |
| 139 | + targetNamespaces: |
| 140 | + nameSelector: |
| 141 | + matchNames: |
| 142 | + - $(workshop_namespace) |
| 143 | + targetSecret: |
| 144 | + name: $(session_name)-kubeconfig |
| 145 | + - apiVersion: v1 |
| 146 | + kind: Service |
| 147 | + metadata: |
| 148 | + name: registry-$(session_name) |
| 149 | + namespace: $(workshop_namespace) |
| 150 | + spec: |
| 151 | + type: ClusterIP |
| 152 | + selector: |
| 153 | + deployment: $(session_name) |
| 154 | + ports: |
| 155 | + - name: registry |
| 156 | + port: 80 |
| 157 | + protocol: TCP |
| 158 | + targetPort: 5001 |
| 159 | + - apiVersion: v1 |
| 160 | + kind: Service |
| 161 | + metadata: |
| 162 | + name: localhost-$(session_name) |
| 163 | + namespace: $(workshop_namespace) |
| 164 | + spec: |
| 165 | + type: ClusterIP |
| 166 | + selector: |
| 167 | + deployment: $(session_name) |
| 168 | + ports: |
| 169 | + - name: renderer |
| 170 | + port: 10081 |
| 171 | + protocol: TCP |
| 172 | + targetPort: 10081 |
| 173 | + environment: |
| 174 | + images: |
| 175 | + registries: |
| 176 | + - content: |
| 177 | + - destination: /educates-client-programs |
| 178 | + prefix: /vmware-tanzu-labs/educates-client-programs |
| 179 | + stripPrefix: true |
| 180 | + onDemand: true |
| 181 | + urls: |
| 182 | + - https://ghcr.io |
| 183 | + objects: |
| 184 | + - apiVersion: v1 |
| 185 | + kind: ServiceAccount |
| 186 | + metadata: |
| 187 | + name: kapp-installer |
| 188 | + - apiVersion: rbac.authorization.k8s.io/v1 |
| 189 | + kind: ClusterRoleBinding |
| 190 | + metadata: |
| 191 | + name: kapp-installer-$(workshop_namespace) |
| 192 | + roleRef: |
| 193 | + apiGroup: rbac.authorization.k8s.io |
| 194 | + kind: ClusterRole |
| 195 | + name: cluster-admin |
| 196 | + subjects: |
| 197 | + - kind: ServiceAccount |
| 198 | + name: kapp-installer |
| 199 | + namespace: $(workshop_namespace) |
0 commit comments