-
Notifications
You must be signed in to change notification settings - Fork 344
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
Added configuration for the agent's securityContext #1190
Added configuration for the agent's securityContext #1190
Conversation
d25817b
to
f14caeb
Compare
Codecov Report
@@ Coverage Diff @@
## master #1190 +/- ##
=======================================
Coverage 87.32% 87.32%
=======================================
Files 89 89
Lines 4891 4892 +1
=======================================
+ Hits 4271 4272 +1
Misses 457 457
Partials 163 163
Continue to review full report at Codecov.
|
That's very unfortunate. Most of the fields that are commonly used are in both objects, but unless we settle for our own lowest common denominator, we can't reuse the info. About the name: what do you think about |
f14caeb
to
517e016
Compare
@jpkrohling Oh, I like that one! Done. Just a quick question because I'm not too failiar with the CRD generation process, running diff --git a/deploy/crds/jaegertracing.io_jaegers_crd.yaml b/deploy/crds/jaegertracing.io_jaegers_crd.yaml
index d3c60575..580f8c90 100644
--- a/deploy/crds/jaegertracing.io_jaegers_crd.yaml
+++ b/deploy/crds/jaegertracing.io_jaegers_crd.yaml
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.2.4
+ controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: jaegers.jaegertracing.io
spec:
@@ -589,6 +589,7 @@ spec:
type: string
type: object
type: array
+ x-kubernetes-list-type: atomic
labels:
additionalProperties:
type: string
@@ -600,11 +601,19 @@ spec:
properties:
limits:
additionalProperties:
- type: string
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
type: object Is this OK? |
No, that's not expected. You probably have a different Operator SDK version than the one that was last used with
Which version are you using? |
$ operator-sdk version
operator-sdk version: "v0.18.2", commit: "f059b5e17447b0bbcef50846859519340c17ffad", kubernetes version: "v1.18.2", go version: "go1.13.10 linux/amd64" However running make generate
./.ci/generate.sh: line 28: /home/chgl/go/bin/controller-gen: No such file or directory
Failed to generate CRDs.
make: *** [Makefile:309: internal-generate] Error 127 |
We have a make target ( Lines 329 to 337 in 5f7472f
I believe this should use the information from the |
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'm blocking this from being merged for now, to sort out the controller-gen changes. The remaining of the PR is looking good.
Thank you, I completely missed the I've been struggling quite a bit to get it working, even downgrading go from 1.15 to 1.14, but there are still quite a lot of diffs between master and what a local FROM ubuntu:20.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
git \
curl \
golang-1.14
RUN export GOROOT=/usr/lib/go-1.14 && \
export PATH=$PATH:/usr/lib/go-1.14/bin/ && \
export PATH=$PATH:/root/go/bin && \
git clone https://github.com/jaegertracing/jaeger-operator.git && \
cd jaeger-operator && \
make install && \
make generate && \
git --no-pager diff It always updates the kubebuilder version to v0.3.0 and mostly seems to add additional validation around resource limits/requests (which doesn't seem too bad (?)). I still don't understand why. |
fa3e72c
to
9874b4a
Compare
No, the change in itself isn't bad. Just worrying that this happens unrelated to the actual change. I can confirm that I see the same once I delete the cached binary that I had. I wonder why the CI isn't having this...
I can't either, but I can confirm that it does work when I do a |
9874b4a
to
d8cd402
Compare
Signed-off-by: chgl <[email protected]>
2ef8bb0
to
f6ee9c8
Compare
@jpkrohling I've tried again with sigs.k8s.io/controller-tools/cmd/[email protected] and it looks better now. Thank you for your help & patience! |
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.
LGTM!
Unfortunately, I can't just use the Jaeger CommonSpec's securityContext as that is a `PodSecurityContext` whereas the sidecar can only have a `SecurityContext`. This required me to add an additional config option `containerSecurityContext`. This does add some redundancy as the `Jaeger.Spec.SecurityContext` is not reused. Is `sidecarContainerSecurityContext` a better name for this config option as the other agent deployments do use the default pod security context? Resolves jaegertracing#1186 Signed-off-by: Prageeth Warnak <[email protected]>
Unfortunately, I can't just use the Jaeger CommonSpec's securityContext as that is a
PodSecurityContext
whereas the sidecar can only have aSecurityContext
. This required me to add an additional config optioncontainerSecurityContext
. This does add some redundancy as theJaeger.Spec.SecurityContext
is not reused.Is
sidecarContainerSecurityContext
a better name for this config option as the other agent deployments do use the default pod security context?Resolves #1186