Compare commits

..

4 Commits

Author SHA1 Message Date
Techno Tim
34c0aee31a Merge branch 'master' into with-metal-lb-interface 2024-11-23 09:57:39 -06:00
Techno Tim
e210fc21b6 Merge branch 'master' into with-metal-lb-interface 2024-10-26 12:16:28 -07:00
Techno Tim
8e26ba8809 Merge branch 'master' into with-metal-lb-interface 2024-10-25 21:21:33 -07:00
Leo
754a379d42 feat(k3s): Add option to set MetalLB interfaces 2024-10-03 21:53:19 +02:00
8 changed files with 18 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
<!-- It's a good idea to check this post first for general troubleshooting https://github.com/timothystewart6/k3s-ansible/discussions/19 --> <!-- It's a good idea to check this post first for general troubleshooting https://github.com/techno-tim/k3s-ansible/discussions/19 -->
<!--- Provide a general summary of the issue in the Title above --> <!--- Provide a general summary of the issue in the Title above -->
@@ -82,4 +82,4 @@ node
## Possible Solution ## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, --> <!--- Not obligatory, but suggest a fix/reason for the bug, -->
- [ ] I've checked the [General Troubleshooting Guide](https://github.com/timothystewart6/k3s-ansible/discussions/20) - [ ] I've checked the [General Troubleshooting Guide](https://github.com/techno-tim/k3s-ansible/discussions/20)

View File

@@ -16,7 +16,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # 6.0.0 uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # 5.3.0
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip' # caching pip dependencies cache: 'pip' # caching pip dependencies

View File

@@ -16,7 +16,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # 6.0.0 uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # 5.3.0
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip' # caching pip dependencies cache: 'pip' # caching pip dependencies

View File

@@ -59,7 +59,7 @@ jobs:
EOF EOF
- name: Set up Python ${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # 6.0.0 uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # 5.3.0
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip' # caching pip dependencies cache: 'pip' # caching pip dependencies

View File

@@ -191,7 +191,7 @@ See the commands [here](https://technotim.live/posts/k3s-etcd-ansible/#testing-y
### Troubleshooting ### Troubleshooting
Be sure to see [this post](https://github.com/timothystewart6/k3s-ansible/discussions/20) on how to troubleshoot common problems Be sure to see [this post](https://github.com/techno-tim/k3s-ansible/discussions/20) on how to troubleshoot common problems
### Testing the playbook using molecule ### Testing the playbook using molecule
@@ -218,7 +218,7 @@ collections:
- name: community.general - name: community.general
- name: ansible.posix - name: ansible.posix
- name: kubernetes.core - name: kubernetes.core
- name: https://github.com/timothystewart6/k3s-ansible.git - name: https://github.com/techno-tim/k3s-ansible.git
type: git type: git
version: master version: master
``` ```

View File

@@ -56,16 +56,16 @@ dependencies:
kubernetes.core: '*' kubernetes.core: '*'
# The URL of the originating SCM repository # The URL of the originating SCM repository
repository: https://github.com/timothystewart6/k3s-ansible repository: https://github.com/techno-tim/k3s-ansible
# The URL to any online docs # The URL to any online docs
documentation: https://github.com/timothystewart6/k3s-ansible documentation: https://github.com/techno-tim/k3s-ansible
# The URL to the homepage of the collection/project # The URL to the homepage of the collection/project
homepage: https://www.youtube.com/watch?v=CbkEWcUZ7zM homepage: https://www.youtube.com/watch?v=CbkEWcUZ7zM
# The URL to the collection issue tracker # The URL to the collection issue tracker
issues: https://github.com/timothystewart6/k3s-ansible/issues issues: https://github.com/techno-tim/k3s-ansible/issues
# A list of file glob-like patterns used to filter any files or directories that should not be included in the build # A list of file glob-like patterns used to filter any files or directories that should not be included in the build
# artifact. A pattern is matched from the relative path of the file or directory of the collection directory. This # artifact. A pattern is matched from the relative path of the file or directory of the collection directory. This

View File

@@ -30,3 +30,4 @@ metal_lb_mode: layer2
metal_lb_available_timeout: 240s metal_lb_available_timeout: 240s
metal_lb_controller_tag_version: v0.14.3 metal_lb_controller_tag_version: v0.14.3
metal_lb_ip_range: 192.168.30.80-192.168.30.90 metal_lb_ip_range: 192.168.30.80-192.168.30.90
metal_lb_interfaces:

View File

@@ -21,6 +21,13 @@ kind: L2Advertisement
metadata: metadata:
name: default name: default
namespace: metallb-system namespace: metallb-system
{% if metal_lb_interfaces %}
spec:
interfaces:
{% for interface in metal_lb_interfaces %}
- {{ interface }}
{% endfor %}
{% endif %}
{% endif %} {% endif %}
{% if metal_lb_mode == "bgp" %} {% if metal_lb_mode == "bgp" %}
--- ---