8 Commits

Author SHA1 Message Date
7f72ab53f4 fix: Incorrect indentation causing malformed PEM file
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-07 10:18:06 +02:00
042d3b0eab fix: Upgrade K8s patch version
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-06 13:44:05 +02:00
7482054904 fix: Refactor kustomize templates
Some checks failed
continuous-integration/drone/push Build is failing
2023-07-06 12:58:31 +02:00
31b21c9b7a Upgrade node template OS version
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-19 12:19:42 +02:00
e03cd20d65 Replay upstream changes;Upgrade to latest minor K8s version
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-19 11:38:53 +02:00
1c19708855 Increase default retries;Add healthcheck
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 16:51:17 +01:00
942c13dde7 Improve console healthchecks
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 11:42:34 +01:00
439223c56e Build n-1 version
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-22 08:54:45 +01:00
8 changed files with 17 additions and 93 deletions

View File

@ -21,8 +21,8 @@ steps:
- yamllint --version - yamllint --version
- name: Linting - name: Linting
# depends_on: depends_on:
# - Debugging information - Debugging information
image: bv11-cr01.bessems.eu/library/packer-extended image: bv11-cr01.bessems.eu/library/packer-extended
pull: always pull: always
commands: commands:
@ -33,8 +33,8 @@ steps:
scripts scripts
- name: Install Ansible Galaxy collections - name: Install Ansible Galaxy collections
# depends_on: depends_on:
# - Linting - Linting
image: bv11-cr01.bessems.eu/library/packer-extended image: bv11-cr01.bessems.eu/library/packer-extended
pull: always pull: always
commands: commands:
@ -47,8 +47,8 @@ steps:
path: /scratch path: /scratch
- name: Kubernetes Bootstrap Appliance - name: Kubernetes Bootstrap Appliance
# depends_on: depends_on:
# - Install Ansible Galaxy collections - Install Ansible Galaxy collections
image: bv11-cr01.bessems.eu/library/packer-extended image: bv11-cr01.bessems.eu/library/packer-extended
pull: always pull: always
commands: commands:
@ -106,8 +106,8 @@ steps:
path: /scratch path: /scratch
- name: Kubernetes Upgrade Appliance - name: Kubernetes Upgrade Appliance
# depends_on: depends_on:
# - Install Ansible Galaxy collections - Install Ansible Galaxy collections
image: bv11-cr01.bessems.eu/library/packer-extended image: bv11-cr01.bessems.eu/library/packer-extended
pull: alwaysquery( pull: alwaysquery(
commands: commands:
@ -165,9 +165,9 @@ steps:
path: /scratch path: /scratch
- name: Remove temporary resources - name: Remove temporary resources
# depends_on: depends_on:
# - Kubernetes Bootstrap Appliance - Kubernetes Bootstrap Appliance
# - Kubernetes Upgrade Appliance - Kubernetes Upgrade Appliance
image: bv11-cr01.bessems.eu/library/packer-extended image: bv11-cr01.bessems.eu/library/packer-extended
commands: commands:
- | - |

View File

@ -16,16 +16,14 @@
{ 'components': ( { 'components': (
metacluster_chartvalues | metacluster_chartvalues |
combine({ 'clusterapi': components.clusterapi }) | combine({ 'clusterapi': components.clusterapi }) |
combine({ 'kubevip' : components.kubevip }) ), combine({ 'kubevip' : components.kubevip }) )
'appliance': {
'version': (applianceversion)
}
} | to_nice_yaml(indent=2, width=4096) } | to_nice_yaml(indent=2, width=4096)
}} }}
- name: Aggregate chart_values into dict - name: Aggregate chart_values into dict
ansible.builtin.set_fact: ansible.builtin.set_fact:
workloadcluster_chartvalues: "{{ workloadcluster_chartvalues | default({}) | combine({ item.key: { 'chart_values': (item.value.chart_values | default('') | from_yaml) } }) }}" workloadcluster_chartvalues: "{{ workloadcluster_chartvalues | default({}) | combine({ item.key: { 'chart_values': (item.value.chart_values | default('') | from_yaml) } }) }}"
# when: item.value.chart_values is defined
loop: "{{ query('ansible.builtin.dict', downstream.helm_charts) }}" loop: "{{ query('ansible.builtin.dict', downstream.helm_charts) }}"
loop_control: loop_control:
label: "{{ item.key }}" label: "{{ item.key }}"

View File

@ -1,14 +0,0 @@
import netaddr
def netaddr_iter_iprange(ip_start, ip_end):
return [str(ip) for ip in netaddr.iter_iprange(ip_start, ip_end)]
class FilterModule(object):
''' Ansible filter. Interface to netaddr methods.
https://pypi.org/project/netaddr/
'''
def filters(self):
return {
'netaddr_iter_iprange': netaddr_iter_iprange
}

View File

@ -1,27 +0,0 @@
- block:
- name: Install json-server chart
kubernetes.core.helm:
name: json-server
chart_ref: /opt/metacluster/helm-charts/json-server
release_namespace: json-server
create_namespace: true
wait: false
kubeconfig: "{{ kubeconfig.path }}"
values: "{{ components['json-server'].chart_values }}"
- name: Ensure json-server API availability
ansible.builtin.uri:
url: https://version.{{ vapp['metacluster.fqdn'] }}/healthz
method: GET
register: api_readycheck
until:
- api_readycheck.json.status is defined
- api_readycheck.json.status == 'running'
retries: "{{ playbook.retries }}"
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
module_defaults:
ansible.builtin.uri:
validate_certs: no
status_code: [200, 201]
body_format: json

View File

@ -1,6 +1,5 @@
- import_tasks: init.yml - import_tasks: init.yml
- import_tasks: k3s.yml - import_tasks: k3s.yml
- import_tasks: json-server.yml
- import_tasks: assets.yml - import_tasks: assets.yml
- import_tasks: kube-vip.yml - import_tasks: kube-vip.yml
- import_tasks: storage.yml - import_tasks: storage.yml

View File

@ -1,7 +1,7 @@
platform: platform:
k3s: k3s:
version: v1.27.1+k3s1 version: v1.25.9+k3s1
packaged_components: packaged_components:
- name: traefik - name: traefik
@ -51,8 +51,6 @@ platform:
url: https://prometheus-community.github.io/helm-charts url: https://prometheus-community.github.io/helm-charts
- name: smallstep - name: smallstep
url: https://smallstep.github.io/helm-charts/ url: https://smallstep.github.io/helm-charts/
- name: spamasaurus
url: https://code.spamasaurus.com/api/packages/djpbessems/helm
components: components:
@ -117,13 +115,13 @@ components:
infrastructure_vsphere: v1.6.0 infrastructure_vsphere: v1.6.0
ipam_incluster: v0.1.0-alpha.2 ipam_incluster: v0.1.0-alpha.2
# Refer to `https://console.cloud.google.com/gcr/images/cloud-provider-vsphere/GLOBAL/cpi/release/manager` for available tags # Refer to `https://console.cloud.google.com/gcr/images/cloud-provider-vsphere/GLOBAL/cpi/release/manager` for available tags
cpi_vsphere: v1.26.1 cpi_vsphere: v1.25.2
workload: workload:
version: version:
calico: v3.25.0 calico: v3.25.0
k8s: v1.27.1 k8s: v1.25.10
node_template: node_template:
url: https://{{ repo_username }}:{{ repo_password }}@sn.itch.fyi/Repository/rel/ubuntu-2204-kube-v1.27.1.ova url: https://{{ repo_username }}:{{ repo_password }}@sn.itch.fyi/Repository/rel/ubuntu-2204-kube-v1.25.10.ova
# dex: # dex:
# helm: # helm:
@ -227,34 +225,6 @@ components:
registry: registry:
size: 25Gi size: 25Gi
json-server:
helm:
version: v0.5.1
chart: spamasaurus/json-server
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
chart_values: !unsafe |
ingress:
enabled: true
hosts:
- host: version.{{ vapp['metacluster.fqdn'] }}
paths:
- path: /
pathType: Prefix
seedData:
configInline: |
{
"appliance": { "version": "{{ appliance.version }}" },
"components": [
{ "app": "argo-cd", "version": "{{ components[argo-cd].helm.version }}" },
{ "app": "cert-manager", "version": "{{ components[cert-manager].helm.version }}" },
{ "app": "cluster-api",
"management": { "foo": "bar" },
"workload": { "foo": "bar" }
}
],
"healthz": { "status": "running" }
}
# keycloakx: # keycloakx:
# helm: # helm:
# version: 2.1.1 # (= Keycloak 20.0.3) # version: 2.1.1 # (= Keycloak 20.0.3)

View File

@ -28,7 +28,6 @@ build {
extra_arguments = [ extra_arguments = [
"--extra-vars", "appliancetype=${source.name}", "--extra-vars", "appliancetype=${source.name}",
"--extra-vars", "applianceversion=${var.appliance_version}",
"--extra-vars", "ansible_ssh_pass=${var.ssh_password}", "--extra-vars", "ansible_ssh_pass=${var.ssh_password}",
"--extra-vars", "docker_username=${var.docker_username}", "--extra-vars", "docker_username=${var.docker_username}",
"--extra-vars", "docker_password=${var.docker_password}", "--extra-vars", "docker_password=${var.docker_password}",

View File

@ -34,5 +34,4 @@ variable "docker_password" {
sensitive = true sensitive = true
} }
variable "appliance_version" {}
variable "k8s_version" {} variable "k8s_version" {}