-
Notifications
You must be signed in to change notification settings - Fork 9
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
Improve readme steps for installation of apps #2364
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found in the README but the change in the update-ips
script looks dangerous. :o
bin/update-ips.bash
Outdated
log_error "No IPs for ${domain} was found. Will block all IPs" | ||
echo "0.0.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this not do the opposite, i.e. allow all IPs? This function is used to resolve a domain name to an IP so that it can be added to the allow list, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This eventually sets the CIDR in the NP to 0.0.0.0/32, i.e. just the 0.0.0.0 ip which would never be a real IP meaning it blocks everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The process_ips_to_cidrs
seems to be the one adding the /32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah of course 🤦
I'm still a bit worried that we might at some point rewrite this and not all IPs go through that same IP to CIDR transformation function.
Also, why would you want it not to fail if the domain can't be resolved? Is it not better to become aware of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, when you use a LoadBalancer Service for ingress-nginx you can't create the domains before installing ingress-nginx. And before you could not run update-ips since it would fail and the schema validation would complain if you tried to apply anything. This seemed like a better approach then having to manually set all NPs to something first. Not perfect but I'm not sure if there is a better solution.
Although I just realized I forgot to mention you would have to re-run update-ips again after setting up the DNS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it not be left emptied instead to disallow everything that way? 🤔
(IIRC the associated rules shouldn't be rendered in that case, because empty netpols allow everything, but we have a split between the old and new netpol still.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe split the script change and the documentation changes into separate PRs, both good for changelog purposes and review purposes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it not be left emptied instead to disallow everything that way? 🤔
If I leave it empty instead the CIDR ends up as just /32
which fails in the apply
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I like the improvements, but I'm missing a section which discusses "the forest" before discussing "the trees".
@@ -114,6 +114,21 @@ There are two options when managing DNS records, manually or ExternalDNS. | |||
|
|||
Assuming you already have everything needed to install the apps, this is what you need to do. | |||
|
|||
> [!NOTE] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm missing a section giving an overview of Apps. This is stuff that we already know and have in our DNA, which is why it's so hard to write it. Someone completely new to the project should first learn that:
- Welkin follows the "configuration as code" principle and expects all configuration to be in a so-called configuration folder.
- Welkin strongly recommends to have this configuration folder in
.git
. Apps may be a submodule, so that the configuration folder is the source of truth for how an environment is set up. - Welkin Apps' functionality is accessed threw the
./bin/ck8s
command-line tool.
Makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a change. Is that satisfactory? Hard to know where to exactly place it.
No longer relevant since script change is moved to separate PR
> | ||
> ```bash | ||
> ./bin/ck8s ops helmfile sc apply -lapp=ingress-nginx --include-transitive-needs | ||
> ./bin/ck8s ops helmfile wc apply -lapp=ingress-nginx --include-transitive-needs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if this README somewhere and somehow should state that you might not be able to run commands for wc
if you have not installed Dex in sc
first, since we usually assume for Welkin that wc
is configured to point to Dex in sc
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should maybe include that the nodes should be labelled with the elastisys.io/node-group
based on what group it belongs to (e.g. worker
or control-plane
) for our node capacity alerts to work properly
Warning
This is a public repository, ensure not to disclose:
What kind of PR is this?
Required: Mark one of the following that is applicable:
Optional: Mark one or more of the following that are applicable:
Important
Breaking changes should be marked
kind/admin-change
orkind/dev-change
depending on typeCritical security fixes should be marked with
kind/security
What does this PR do / why do we need this PR?
Tries to improve the readme so that it is possible to install apps solely based on it.
Decided in https://github.com/elastisys/ck8s-arch/issues/215
Information to reviewers
Checklist
NetworkPolicy Dashboard