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

Default integrationPlatform created at operator startup dose not honor OPERATOR_ID config #4167

Closed
valdar opened this issue Mar 27, 2023 · 0 comments · Fixed by #4168
Closed

Comments

@valdar
Copy link
Member

valdar commented Mar 27, 2023

See

if pl, err := kubernetes.GetIntegrationPlatform(ctx, c, platformName, operatorNamespace); pl == nil || k8serrors.IsNotFound(err) {
defaultPlatform := v1.NewIntegrationPlatform(operatorNamespace, platformName)
if defaultPlatform.Labels == nil {
defaultPlatform.Labels = make(map[string]string)
}
defaultPlatform.Labels["camel.apache.org/platform.generated"] = "true"
if _, err := c.CamelV1().IntegrationPlatforms(operatorNamespace).Create(ctx, &defaultPlatform, metav1.CreateOptions{}); err != nil {
return err
}
// Make sure that IntegrationPlatform installed in operator namespace can be seen by others
if err := install.IntegrationPlatformViewerRole(ctx, c, operatorNamespace); err != nil && !k8serrors.IsAlreadyExists(err) {
return errors.Wrap(err, "Error while installing global IntegrationPlatform viewer role")
}

If operator has not empty OPERATOR_ID, the default integrationPlatform created at startup should be annotated with:
camel.apache.org/operator.id: $OPERATOR_ID in order to be picked up for reconcilation.

valdar added a commit to valdar/camel-k that referenced this issue Mar 27, 2023
valdar added a commit to valdar/camel-k that referenced this issue Mar 28, 2023
squakez pushed a commit that referenced this issue Mar 28, 2023
valdar added a commit to valdar/camel-k that referenced this issue Mar 28, 2023
valdar added a commit to valdar/camel-k that referenced this issue Mar 28, 2023
valdar added a commit that referenced this issue Mar 28, 2023
squakez pushed a commit that referenced this issue Mar 29, 2023
squakez pushed a commit to jboss-fuse/camel-k that referenced this issue Mar 29, 2023
…rtup dose not honor OPERATOR_ID config

(cherry picked from commit apache/camel-k@f9376ec62)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant