-
Notifications
You must be signed in to change notification settings - Fork 12
scripts: added sharing objectstorage for local cluster with ingress #2882
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
base: main
Are you sure you want to change the base?
Conversation
|
I’ve added the setup so it can be triggered via a script whenever we need this functionality. |
|
Could we instead make this a feature available through the config, so you set it as an option during the configuration stage? Also, this changes how ingress traffic is handled from the default case which I'm not sure we want here given that we have solved that issue before without using host ports. |
simonklb
left a comment
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 agree with @aarnq. This looks like a workaround patch to the setup. Is there something preventing this to be configured properly instead?
|
Now I have changed the solution without enabling hostport in ingress. Also setup of shared object storage is added during the configuration stage. |
helmfile.d/charts/networkpolicy/service-cluster/templates/ingress-nginx/controller.yaml
Show resolved
Hide resolved
scripts/local-cluster.sh
Outdated
| log.info "Configuring shared object storage endpoint for Minio" | ||
| yq -Pi ".objectStorage.s3.regionEndpoint = \"http://minio.${domain}:30080\"" "${CK8S_CONFIG_PATH}/common-config.yaml" | ||
| yq -Pi '.networkPolicies.global.objectStorage.ports[0] = 30080' "${CK8S_CONFIG_PATH}/common-config.yaml" | ||
| yq -Pi '.networkPolicies.global.objectStorage.ports[1] = 80' "${CK8S_CONFIG_PATH}/common-config.yaml" | ||
| yq -Pi '.networkPolicies.ingressNginx.ingressOverride.enabled = false' "${CK8S_CONFIG_PATH}/common-config.yaml" |
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.
Why can't we just create a new config in https://github.com/elastisys/compliantkubernetes-apps/blob/main/scripts/local-clusters/configs or incorporate this in the existing config(s) instead of patching this afterwards?
scripts/local-cluster.sh
Outdated
| --set ingress.enabled=true \ | ||
| --set ingress.ingressClassName=nginx \ | ||
| --set ingress.hosts[0]=minio."${domain}" |
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.
Can this not be set in config?
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 are also having task to make the dev more simpler. I think I will rework on the PR to make this as default configuration of setting up object storage sharable between SC and WC. So that the instruction is less also simple. Does that sound good?
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.
Sounds good to me. I don't see why you would not want a shared object storage between the clusters in the local cluster setup since that is closer to what we have in real environments.
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.
Yeah I would want it same way. That's why I mentioned it can be a default setup instead of making it optional setup using script.
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.
To be clear, when I wrote "I don't see why you would not want..." I meant you as in everyone generally, not you specifically. 😄
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.
Yeah I understood in that way only 😄
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-changeorkind/dev-changedepending on typeCritical security fixes should be marked with
kind/securityWhat does this PR do / why do we need this PR?
This PR enables Minio ingress and updates node-local-dns and common-config to support a shared objectstorage setup between SC and WC in the local cluster environment.
...
Information to reviewers
How to run / how to test.
Init config
Create the Service Cluster (SC) with ingress enabled:
Create the Workload Cluster (WC) without Minio:
Set up NodeLocalDNS:
Install Velero in the WC to verify that storage from SC is accessible:
Once all Velero pods are running, check the backup location:
Expected output:
--->
Checklist