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

KIM Integration - adjustments to current KIM behavior #1049

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ func (s *CreateRuntimeResourceStep) createLabelsForRuntime(operation internal.Op
}
if s.kimConfig.ViewOnly && !s.kimConfig.IsDrivenByKimOnly(broker.PlanNamesMapping[operation.ProvisioningParameters.PlanID]) {
labels["kyma-project.io/controlled-by-provisioner"] = "true"
} else {
labels["kyma-project.io/controlled-by-provisioner"] = "false"
}
return labels
}
Expand Down Expand Up @@ -339,6 +341,8 @@ func (s *CreateRuntimeResourceStep) createNetworkingConfiguration(operation inte
Pods: DefaultIfParamNotSet(networking.DefaultPodsCIDR, networkingParams.PodsCidr),
Services: DefaultIfParamNotSet(networking.DefaultServicesCIDR, networkingParams.ServicesCidr),
Nodes: DefaultIfParamZero(networking.DefaultNodesCIDR, networkingParams.NodesCidr),
//TODO remove when KIM is ready with setting this value
Type: ptr.String("calico"),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ const (
)

var runtimeAdministrators = []string{"admin1@test.com", "admin2@test.com"}

var defaultNetworking = imv1.Networking{
Nodes: networking.DefaultNodesCIDR,
Pods: networking.DefaultPodsCIDR,
Services: networking.DefaultServicesCIDR,
//TODO: remove after KIM is handling this properly
Type: ptr.String("calico"),
}

var defaultOIDSConfig = internal.OIDCConfigDTO{
ClientID: "client-id-default",
GroupsClaim: "gc-default",
Expand Down Expand Up @@ -414,6 +418,8 @@ func TestCreateRuntimeResourceStep_Defaults_AWS_MultiZoneWithNetworking_ActualCr
Nodes: "192.168.48.0/20",
Pods: "10.104.0.0/24",
Services: "10.105.0.0/24",
//TODO remove after KIM is handling this properly
Type: ptr.String("calico"),
}, runtime.Spec.Shoot.Networking)

_, err = memoryStorage.Instances().GetByID(operation.InstanceID)
Expand Down Expand Up @@ -728,7 +734,7 @@ func assertLabelsKIMDriven(t *testing.T, preOperation internal.Operation, runtim
assertLabels(t, preOperation, runtime)

provisionerDriven, ok := runtime.Labels["kyma-project.io/controlled-by-provisioner"]
assert.True(t, !ok || provisionerDriven == "false")
assert.True(t, ok && provisionerDriven == "false")
}

func assertLabelsProvisionerDriven(t *testing.T, preOperation internal.Operation, runtime imv1.Runtime) {
Expand Down
Loading