Skip to content

Commit

Permalink
Update strimzi chart release (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyphreak authored Apr 24, 2024
1 parent d164f8f commit da6e10b
Show file tree
Hide file tree
Showing 27 changed files with 262 additions and 378 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,32 @@ jobs:
- zalando
- strimzi
include:
- image: v1.27.3
- image: v1.26.6
- image: v1.25.11
- image: v1.24.15
- release: v0.22.0
image: v1.29.2
- release: v0.22.0
image: v1.28.7
- release: v0.22.0
image: v1.27.11
- release: 0.22.0
image: v1.26.14
- release: 0.22.0
image: v1.25.16
- release: 0.22.0
image: v1.24.17
- release: 0.22.0
image: v1.23.17
steps:
- name: Check out the codebase
uses: actions/checkout@v4
with:
path: 'nephelaiio.k8s'

- name: Set up python 3
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install helm
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: 'latest'
Expand All @@ -66,6 +76,7 @@ jobs:
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
KIND_RELEASE: ${{ matrix.release }}
K8S_RELEASE: ${{ matrix.image }}
HELM_BIN: ${{ steps.helm.outputs.helm-path }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
24 changes: 16 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all ${MAKECMDGOALS}
.PHONY: ${MAKECMDGOALS}

KIND_RELEASE := $$(yq eval '.jobs.molecule.strategy.matrix.include[0].release ' .github/workflows/molecule.yml)
K8S_RELEASE := $$(yq eval '.jobs.molecule.strategy.matrix.include[0].image' .github/workflows/molecule.yml)
Expand Down Expand Up @@ -49,13 +49,21 @@ version:
run:
$(MOLECULE_EPHEMERAL_DIR)/bwrap $(filter-out $@,$(MAKECMDGOALS))

helm kubectl:
KUBECONFIG=$(MOLECULE_EPHEMERAL_DIR)/config $@ $(filter-out $@,$(MAKECMDGOALS))
ifeq (helm,$(firstword $(MAKECMDGOALS)))
HELM_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(subst $(space),,$(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))):;@:)
endif

psql:
PGPASSWORD=$(PG_PASS) psql -h $(PG_HOST) -U $(PG_USER) $(PG_DB)
helm:
KUBECONFIG=$(MOLECULE_EPHEMERAL_DIR)/config $@ ${HELM_ARGS}

ifeq (kubectl,$(firstword $(MAKECMDGOALS)))
KUBECTL_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(subst $(space),,$(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))):;@:)
endif

poetry: install
kubectl:
KUBECONFIG=$(MOLECULE_EPHEMERAL_DIR)/config $@ ${KUBECTL_ARGS}

%:
@:
psql:
PGPASSWORD=$(PG_PASS) psql -h $(PG_HOST) -U $(PG_USER) $(PG_DB)
38 changes: 10 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Role includes a cluster verifier that can be activated by setting `k8s_verify: t

## Roadmap

* Add local path provisioner
* Add Grafana deployment
* Add Kyverno deployment
* Move deployments to ArgoCD apps deployed synchronously
* Add statefulset status tests
* Add deployment status tests
* Add service status tests
Expand Down Expand Up @@ -162,64 +166,42 @@ Keel parameters:
| k8s_keel_chart_release | undefined | string | Keel helm chart release | no |


## Data Types

### Secret
```
{
"name": string,
"namespace": string
"type": [string]
"data": hash
}
```

## Dependencies

The below Ansible collections are needed on the host that executes this module:
The following Ansible collections are needed on the host that executes this module:
* ansible.utils
* nephelaiio.plugins

### System

The below requirements are needed on the host that executes this module.
* Linux 64 bit OS
The following requirements are needed on the host that executes this module.
* Linux 64 bit
* kubectl binary is available on PATH

### Python

The below requirements are needed on the host that executes this module.
The following requirements are needed on the host that executes this module.

* kubernetes = "^24.2.0"
* openshift = "^0.13.1"
* jmespath = "^1.0.1"

### Ansible

The below Ansible roles are needed on the host that executes this module:

* nephelaiio.plugins

The below Ansible collections are needed on the host that executes this module:
The following Ansible collections are needed on the host that executes this module:

* community.general

## Example Playbook

``` yaml
---
- name: Deploy local kind cluster

- name: Deploy local K8s cluster
hosts: localhost

gather_facts: false

roles:

- nephelaiio.plugins
- nephelaiio.kind
- nephelaiio.k8s

```
## Testing
Expand Down
2 changes: 1 addition & 1 deletion defaults/main/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ k8s_mysql_chart:
name: "mysql-operator"
repo: "https://mysql.github.io/mysql-operator"
release: "2.1.2"
last_checked: "2024-02-02T22:38:14-06:00"
last_checked: "2024-04-23T11:40:09-06:00"
2 changes: 1 addition & 1 deletion defaults/main/opensearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ k8s_opensearch_chart:
name: "opensearch-operator"
repo: "https://opensearch-project.github.io/opensearch-k8s-operator"
release: "2.4.0"
last_checked: "2024-02-02T22:35:57-06:00"
last_checked: "2024-04-23T11:38:48-06:00"
k8s_opensearch_namespace: opensearch
k8s_opensearch_wait_timeout: "{{ k8s_wait_timeout }}"
4 changes: 2 additions & 2 deletions defaults/main/strimzi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ k8s_strimzi_verify: "{{ k8s_strimzi_deploy }}"
k8s_strimzi_chart:
name: "strimzi-kafka-operator"
repo: "https://strimzi.io/charts/"
release: "0.39.0"
last_checked: "2024-02-02T22:34:11-06:00"
release: "0.40.0"
last_checked: "2024-04-23T11:37:39-06:00"
k8s_strimzi_namespace: strimzi
k8s_strimzi_wait_timeout: "{{ k8s_wait_timeout }}"
2 changes: 1 addition & 1 deletion molecule/argocd/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependency:
platforms:
- name: localhost
driver:
name: delegated
name: default
provisioner:
name: ansible
playbooks:
Expand Down
6 changes: 2 additions & 4 deletions molecule/common/create.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
- name: Create
hosts: localhost
roles:
- nephelaiio.plugins
tasks:
- name: Deploy kind cluster
- name: Deploy Kind cluster
when: k8s_molecule_cluster_type == 'kind'
block:
- name: Deploy kind cluster
- name: Deploy Kind cluster
ansible.builtin.include_role:
name: nephelaiio.kind
vars:
Expand Down
6 changes: 3 additions & 3 deletions molecule/common/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
hosts: localhost
gather_facts: true
tasks:
- name: Destroy kind cluster
- name: Destroy Kind cluster
when: k8s_molecule_cluster_type == 'kind'
block:
- name: Destroy kind cluster
- name: Destroy Kind cluster
ansible.builtin.include_role:
name: nephelaiio.kind
vars:
Expand All @@ -17,7 +17,7 @@
- name: Destroy k3s cluster
when: k8s_molecule_cluster_type == 'k3s'
block:
- name: Stat mysql router state file
- name: Stat MySQL router state file
ansible.builtin.stat:
path: "/usr/local/bin/k3s-uninstall.sh"
register: k8s_uninstaller
Expand Down
2 changes: 1 addition & 1 deletion molecule/common/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
url: https://api.github.com/repos/helm/helm/releases/latest
register: helm_release_query

- name: Set kind release target
- name: Set Kind release target
ansible.builtin.set_fact:
helm_release: "{{ helm_release_query.json.tag_name }}"

Expand Down
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependency:
platforms:
- name: localhost
driver:
name: delegated
name: default
provisioner:
name: ansible
playbooks:
Expand Down
2 changes: 1 addition & 1 deletion molecule/longhorn/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependency:
platforms:
- name: localhost
driver:
name: delegated
name: default
provisioner:
name: ansible
playbooks:
Expand Down
2 changes: 1 addition & 1 deletion molecule/mysql/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependency:
platforms:
- name: localhost
driver:
name: delegated
name: default
provisioner:
name: ansible
playbooks:
Expand Down
2 changes: 1 addition & 1 deletion molecule/opensearch/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependency:
platforms:
- name: localhost
driver:
name: delegated
name: default
provisioner:
name: ansible
playbooks:
Expand Down
2 changes: 1 addition & 1 deletion molecule/strimzi/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependency:
platforms:
- name: localhost
driver:
name: delegated
name: default
provisioner:
name: ansible
playbooks:
Expand Down
2 changes: 1 addition & 1 deletion molecule/zalando/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependency:
platforms:
- name: localhost
driver:
name: delegated
name: default
provisioner:
name: ansible
playbooks:
Expand Down
Loading

0 comments on commit da6e10b

Please sign in to comment.