-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
75 changed files
with
573 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,4 +60,13 @@ all: | |
hosts: | ||
node[3:4]: | ||
node-esp-1: | ||
bootstrap: | ||
hosts: | ||
node2: | ||
vault: | ||
hosts: | ||
node1: | ||
haproxy: | ||
hosts: | ||
node1: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
|
||
- name: Bootstrap Cluster | ||
hosts: node1 | ||
hosts: bootstrap | ||
gather_facts: false | ||
become: false | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
|
||
- name: Install load balancer | ||
hosts: gateway | ||
hosts: haproxy | ||
gather_facts: true | ||
tags: [install] | ||
become: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
|
||
- name: Configure Vault | ||
hosts: vault | ||
gather_facts: false | ||
|
||
collections: | ||
- kubernetes.core | ||
|
||
environment: | ||
# The location of the kubeconfig file on the master. | ||
K8S_AUTH_KUBECONFIG: ~/.kube/config | ||
|
||
pre_tasks: | ||
# Install Python PIP and jq utility packages | ||
- name: Ensure required packages are installed. | ||
package: | ||
name: | ||
- python3-pip | ||
- python3-setuptools | ||
- jq | ||
state: present | ||
become: true | ||
# Install kubernetes python packages (Ansible kubernetes collection dependency) | ||
- name: Ensure kubernetes Python library is installed. | ||
pip: | ||
name: kubernetes | ||
state: present | ||
become: true | ||
# Install Hashicorp python packages (Ansible hashi module dependency) | ||
- name: Ensure hashicorp vault python library is installed. | ||
pip: | ||
name: hvac | ||
state: present | ||
become: true | ||
|
||
# Install Helm diff plugin to have a better idempotence check | ||
- name: Intall Helm Plugin | ||
kubernetes.core.helm_plugin: | ||
plugin_path: "https://github.com/databus23/helm-diff" | ||
state: present | ||
|
||
- name: Include vault variables | ||
include_vars: "vars/vault.yml" | ||
|
||
- name: Include picluster variables | ||
include_vars: "vars/picluster.yml" | ||
|
||
tasks: | ||
- name: Create namespaces. | ||
kubernetes.core.k8s: | ||
name: "{{ item }}" | ||
api_version: v1 | ||
kind: Namespace | ||
state: present | ||
with_items: | ||
- "vault" | ||
|
||
- name: Configure Vault integration | ||
include_tasks: tasks/configure_vault_integration.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
# Traefik helm chart v23.1.0 CDRs. | ||
# Traefik helm chart CDRs. | ||
# Traefik provides CDRs upgrade process (https://github.com/traefik/traefik-helm-chart#upgrading-crds) | ||
# Issue #581(https://github.com/traefik/traefik-helm-chart/issues/581) | ||
# Within CDRs direcory in github repository there is a kustomization.yaml. | ||
# Within CDRs directory in github repository there is a kustomization.yaml. | ||
# Traefik helm chart to be installed with helm param --skip-cdrs | ||
- https://github.com/traefik/traefik-helm-chart/traefik/crds/?ref=v23.1.0 | ||
- https://github.com/traefik/traefik-helm-chart/traefik/crds/?ref=v26.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.