Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Script: LXC IP-Tag #536

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

New Script: LXC IP-Tag #536

wants to merge 7 commits into from

Conversation

MickLesk
Copy link
Member

@MickLesk MickLesk commented Nov 27, 2024

Description

Add a new script for an Service "LXC IP-Tag".
This script originally comes from @gitsang and has been requested here several times. I also find it quite nice 😄 I also use it in my main Proxmox.

Discussion: #395
Issue: #537

Quote: "I have no concerns and glad that the community is interested in integrating this script." (@gitsang) - Thx!

The script is modified and should conform to our conventions.

The original source is located here: https://github.com/gitsang/lxc-iptag

Type of change

Please check the relevant option(s):

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (a fix or feature that would cause existing functionality to change unexpectedly)
  • New script (a fully functional and thoroughly tested script or set of scripts.)

Prerequisites

The following efforts must be made for the PR to be considered. Please check when completed:

  • Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions)
  • Testing performed (I have tested my changes, ensuring everything works as expected)
  • Documentation updated (I have updated any relevant documentation)

Additional Information (optional)

Provide any additional context or screenshots about the feature or fix here.

Before I executed the script (note runtime)
image

Script executed:
image

IP generated as Tag:
image

Switch IP address:
image

Updated Tag after IP change
image

@MickLesk MickLesk requested a review from a team as a code owner November 27, 2024 10:49
@github-actions github-actions bot added new script A change that adds a new script website A change to the website labels Nov 27, 2024
misc/add-lxc-iptag.sh Outdated Show resolved Hide resolved
misc/add-lxc-iptag.sh Show resolved Hide resolved
misc/add-lxc-iptag.sh Show resolved Hide resolved
misc/add-lxc-iptag.sh Outdated Show resolved Hide resolved
misc/add-lxc-iptag.sh Outdated Show resolved Hide resolved
misc/add-lxc-iptag.sh Outdated Show resolved Hide resolved
misc/add-lxc-iptag.sh Outdated Show resolved Hide resolved
misc/add-lxc-iptag.sh Outdated Show resolved Hide resolved
json/add-lxc-iptag.json Outdated Show resolved Hide resolved
json/add-lxc-iptag.json Outdated Show resolved Hide resolved
MickLesk and others added 3 commits November 28, 2024 09:45
Co-authored-by: Håvard Gjøby Thom <[email protected]>
Co-authored-by: Håvard Gjøby Thom <[email protected]>
Co-authored-by: Håvard Gjøby Thom <[email protected]>
@MickLesk
Copy link
Member Author

@havardthom what do you say about a AIO Script?

https://raw.githubusercontent.com/MickLesk/Proxmox_DEV/refs/heads/main/misc/add-lxc-iptag.sh

When you say yes, then i push it into this PR and remove the other files

@havardthom
Copy link
Contributor

@havardthom what do you say about a AIO Script?

https://raw.githubusercontent.com/MickLesk/Proxmox_DEV/refs/heads/main/misc/add-lxc-iptag.sh

When you say yes, then i push it into this PR and remove the other files

How does code highlighting work in editor, is the .func bash code all shown as a string?

@MickLesk
Copy link
Member Author

@havardthom what do you say about a AIO Script?
https://raw.githubusercontent.com/MickLesk/Proxmox_DEV/refs/heads/main/misc/add-lxc-iptag.sh
When you say yes, then i push it into this PR and remove the other files

How does code highlighting work in editor, is the .func bash code all shown as a string?

https://github.com/MickLesk/Proxmox_DEV/blob/main/misc/add-lxc-iptag.sh

@havardthom
Copy link
Contributor

@havardthom what do you say about a AIO Script?
https://raw.githubusercontent.com/MickLesk/Proxmox_DEV/refs/heads/main/misc/add-lxc-iptag.sh
When you say yes, then i push it into this PR and remove the other files

How does code highlighting work in editor, is the .func bash code all shown as a string?

https://github.com/MickLesk/Proxmox_DEV/blob/main/misc/add-lxc-iptag.sh

Guess it is ok since this is code that will not be changed very often. i would change the indentation to 2 spaces though

@MickLesk
Copy link
Member Author

I'll continue tomorrow, was still stuck on a bug and didn't manage to test it completely today

@lasharor
Copy link

@MickLesk Not sure if here is the right place. I suggest to make the CIDR configurable during setup. The current config wouldn't make sense in most cases. And to be honest leads to many tags on for instance the docker lxc.

@MickLesk
Copy link
Member Author

@MickLesk Not sure if here is the right place. I suggest to make the CIDR configurable during setup. The current config wouldn't make sense in most cases. And to be honest leads to many tags on for instance the docker lxc.

Ive 1 Tag at my docker LXC with 10 Apps 😅
You can configure the cidr later. For normal users is the default enough. I dont like overengineering this Script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new script A change that adds a new script website A change to the website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants