Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
python-version: '3.10'

- name: Install dependencies
run: pip install --no-color tosca-parser yamllint
run: pip install --no-color git+https://github.com/micafer/tosca-parser@im yamllint

- name: Check Yamllint in templates
run: |
Expand Down
7 changes: 7 additions & 0 deletions custom_types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,12 @@ node_types:
required: no
type: string
default: "jhondoe@server.com"
tls_certificates:
required: no
type: map
entry_schema:
type: tosca.datatypes.grycap.TLSCertificate
default: {}
public_dns_name:
required: no
type: string
Expand Down Expand Up @@ -840,6 +846,7 @@ node_types:
kube_nvidia_support: { get_property: [ SELF, nvidia_support ] }
kube_cert_manager: { get_property: [ SELF, cert_manager ] }
kube_cert_user_email: { get_property: [ SELF, cert_user_email ] }
kube_tls_certificates: { get_property: [ SELF, tls_certificates ] }
kube_public_dns_name: { get_property: [ SELF, public_dns_name ] }
kube_public_additional_dns_names: { get_property: [ SELF, public_additional_dns_names ] }
kube_cert_manager_challenge: { get_property: [ SELF, cert_manager_challenge ] }
Expand Down
13 changes: 11 additions & 2 deletions templates/kubernetes.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
tosca_definitions_version: tosca_simple_yaml_1_0

imports:
- grycap_custom_types: https://raw.githubusercontent.com/grycap/tosca/main/custom_types.yaml
- grycap_custom_types: https://raw.githubusercontent.com/grycap/tosca/k8s_tls/custom_types.yaml

description: Deploy a Kubernetes Virtual Cluster.

metadata:
template_name: Kubernetes
template_version: "1.3.0"
template_version: "1.4.0"
display_name: Deploy a Kubernetes Virtual Cluster
icon: images/kubernetes.png
order: 3
Expand Down Expand Up @@ -211,6 +211,13 @@ topology_template:
constraints:
- valid_values: [ false, true ]

kube_gen_tls_certificates:
type: boolean
description: Flag to generate self-signed TLS certificates for the cluster
default: false
constraints:
- valid_values: [ false, true ]

node_templates:

lrms_front_end:
Expand All @@ -236,6 +243,7 @@ topology_template:
nvidia_support: { get_input: fe_kube_nvidia_support }
cert_manager: { get_input: kube_cert_manager }
cert_user_email: { get_input: kube_cert_user_email }
tls_certificates: { get_attribute: [ HOST, endpoint, tls_certificates ] }
public_dns_name: { get_input: kube_public_dns_name}
cri_runtime: { get_input: kube_cri_runtime }
csi_driver: { get_input: kube_csi_driver }
Expand All @@ -251,6 +259,7 @@ topology_template:
endpoint:
properties:
dns_name: kubeserver
tls: { get_input: kube_gen_tls_certificates }
additional_dns_names:
- { get_input: kube_public_dns_name}
network_name: PUBLIC
Expand Down
Loading