mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +02:00
feat(k8s): Introduce the ability to restrict access to default namespace (EE-745) (#5337)
This commit is contained in:
parent
c26af1449c
commit
7d6b1edd48
16 changed files with 56 additions and 60 deletions
|
@ -145,11 +145,7 @@
|
|||
<label class="control-label text-left">
|
||||
Restrict access to the default namespace
|
||||
</label>
|
||||
<label class="switch" style="margin-left: 20px;"> <input type="checkbox" disabled /><i></i> </label>
|
||||
<span class="text-muted small" style="margin-left: 15px;">
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
This feature is available in <a href="https://www.portainer.io/business-upsell?from=k8s-setup-default" target="_blank"> Portainer Business Edition</a>.
|
||||
</span>
|
||||
<label class="switch" style="margin-left: 20px;"> <input type="checkbox" ng-model="ctrl.formValues.RestrictDefaultNamespace" /><i></i> </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -107,6 +107,7 @@ class KubernetesConfigureController {
|
|||
endpoint.Kubernetes.Configuration.UseLoadBalancer = this.formValues.UseLoadBalancer;
|
||||
endpoint.Kubernetes.Configuration.UseServerMetrics = this.formValues.UseServerMetrics;
|
||||
endpoint.Kubernetes.Configuration.IngressClasses = ingressClasses;
|
||||
endpoint.Kubernetes.Configuration.RestrictDefaultNamespace = this.formValues.RestrictDefaultNamespace;
|
||||
}
|
||||
|
||||
transformFormValues() {
|
||||
|
@ -259,6 +260,7 @@ class KubernetesConfigureController {
|
|||
UseLoadBalancer: false,
|
||||
UseServerMetrics: false,
|
||||
IngressClasses: [],
|
||||
RestrictDefaultNamespace: false,
|
||||
};
|
||||
|
||||
try {
|
||||
|
@ -281,6 +283,7 @@ class KubernetesConfigureController {
|
|||
|
||||
this.formValues.UseLoadBalancer = this.endpoint.Kubernetes.Configuration.UseLoadBalancer;
|
||||
this.formValues.UseServerMetrics = this.endpoint.Kubernetes.Configuration.UseServerMetrics;
|
||||
this.formValues.RestrictDefaultNamespace = this.endpoint.Kubernetes.Configuration.RestrictDefaultNamespace;
|
||||
this.formValues.IngressClasses = _.map(this.endpoint.Kubernetes.Configuration.IngressClasses, (ic) => {
|
||||
ic.IsNew = false;
|
||||
ic.NeedsDeletion = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue