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

feature(knative): support configmap and secrets #500

Merged
merged 1 commit into from
Mar 4, 2019

Conversation

lburgazzoli
Copy link
Contributor

This add support for optionally mount configmaps and secrets to knative services, the default behaviour is still to use env var for backward compatibility.

@nicolaferraro do you mind trying this PR

Copy link
Member

@nicolaferraro nicolaferraro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get some errors (installed 0.4.0 on minikube):

{"level":"error","ts":1551392315.4278023,"logger":"kubebuilder.controller","msg":"Reconciler error","controller":"integration-controller","request":"default/printer","error":"could not create or replace resource printer: Internal error occurred: admission webhook \"webhook.serving.knative.dev\" denied the request: mutation failed: must not set the field(s): spec.runLatest.configuration.revisionTemplate.spec.container.volumeMounts[0].subPath","errorVerbose":"Internal error occurred: admission webhook \"webhook.serving.knative.dev\" denied the request: mutation failed: must not set the field(s): spec.runLatest.configuration.revisionTemplate.spec.container.volumeMounts[0].subPath\ncould not create or replace resource printer\ngithub.com/apache/camel-k/pkg/util/kubernetes.ReplaceResource\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/pkg/util/kubernetes/replace.go:66\ngithub.com/apache/camel-k/pkg/util/kubernetes.ReplaceResources\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/pkg/util/kubernetes/replace.go:37\ngithub.com/apache/camel-k/pkg/controller/integration.(*deployAction).Handle\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/pkg/controller/integration/deploy.go:67\ngithub.com/apache/camel-k/pkg/controller/integration.(*ReconcileIntegration).Reconcile\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/pkg/controller/integration/integration_controller.go:134\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:215\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:2361","stacktrace":"github.com/apache/camel-k/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:217\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\t/home/nferraro/gopaths/camel-k/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}

pkg/util/util.go Show resolved Hide resolved
docs/traits.adoc Show resolved Hide resolved
@lburgazzoli
Copy link
Contributor Author

@nicolaferraro ah damn yes, we can't use subPath

Will rework

@lburgazzoli
Copy link
Contributor Author

should be better now

@lburgazzoli lburgazzoli marked this pull request as ready for review March 1, 2019 22:50
Copy link
Member

@nicolaferraro nicolaferraro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@nicolaferraro nicolaferraro merged commit d0a228c into apache:master Mar 4, 2019
@lburgazzoli lburgazzoli deleted the knative-resources branch March 4, 2019 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants