-
Notifications
You must be signed in to change notification settings - Fork 480
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
refactor (jkube-kit/config/resource) : Deprecate jkube.io
annotation prefix in favor of jkube.eclipse.org
for JKubeAnnotations (#1273)
#1995
Conversation
Eclipse JKube CI ReportStarted new GH workflow run for #1995 (2023-02-23T17:28:57Z) ⚙️ JKube E2E Tests (4253717473)
|
f7fa0a5
to
96b5817
Compare
Codecov Report
@@ Coverage Diff @@
## master #1995 +/- ##
============================================
- Coverage 55.65% 54.17% -1.49%
+ Complexity 4276 4058 -218
============================================
Files 481 480 -1
Lines 21190 21080 -110
Branches 2838 2815 -23
============================================
- Hits 11794 11420 -374
- Misses 8189 8491 +302
+ Partials 1207 1169 -38
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
96b5817
to
f7d2045
Compare
@@ -617,6 +617,9 @@ For `Job`, this defaults to `OnFailure`. For others, it's not provided ({cluster | |||
|
|||
| `serviceAccount` | |||
| ServiceAccount name which will be used by pods created by controller resources(e.g. `Deployment`, `ReplicaSet` etc) | |||
|
|||
| `useOldJKubePrefix` |
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.
nit: useLegacyJKubePrefix
I think that generally replacing old
with legacy
across this PR might give a better impression.
f7d2045
to
16e9e3c
Compare
16e9e3c
to
9936521
Compare
} | ||
|
||
public String value() { | ||
return annotation; | ||
public String value(boolean useDeprecatedPrefix) { |
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.
To me it would be more elegant to set the useDeprecatedPrefix
with a with
method
JKubeAnnotations.GIT_COMMIT.withUseDeprecatedPrefix(true).value();
default with useDeprecatedPrefix
to false:
JKubeAnnotations.GIT_COMMIT.value();
at the moment, when reading the code, it is not clear what is passed to value(arg)
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.
IMHO I'd simplify this, just provide two methods (no need for a public static method that is not reused anywhere?), a simple value with the boolean parameter that overloads and calls the value() method with false
(default),
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 checked and getAnnotationPrefix
method seems to be getting used in AutoTLSEnricher to determine jkube prefixes in mount points:
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've created a separate issue to handle this case #2068 . I've moved this static method to a utility class
8d90693
to
1d3b266
Compare
ec9ac8b
to
62d4889
Compare
ba1f5a8
to
f2f5f00
Compare
…n prefix in favor of `jkube.eclipse.org` for JKubeAnnotations (eclipse-jkube#1273) + Deprecate `jkube.io` annotation prefix in favor of `jkube.eclipse.org` + Add `jkube.useOldJKubePrefix` flag to switch to `jkube.io` annotation prefix in case any user is interested in this. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…prefix Signed-off-by: Rohan Kumar <rohaan@redhat.com>
f2f5f00
to
cd51945
Compare
@@ -38,7 +38,7 @@ endif::[] | |||
| *tlsSecretVolumeMountPoint* | |||
| Where the service serving secret should be mounted to in the pod. | |||
|
|||
Defaults to `/var/run/secrets/jkube.io/tls-pem`. | |||
Defaults to `/var/run/secrets/jkube.eclipse.org/tls-pem`. |
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.
These were finally not affected
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.
Looks good except for the changes in the TLS enricher documentation
…pse.org` + Mark `jkube.io/` annotations as Deprecated + Add `jkube.eclipse.org/` prefixed annotations to list of annotations + Add documentation for new ResourceConfig's field `useOldJKubePrefix` Signed-off-by: Rohan Kumar <rohaan@redhat.com>
cd51945
to
4ef486a
Compare
SonarCloud Quality Gate failed. |
Description
Fixes #1273
jkube.io
annotation prefix in favor ofjkube.eclipse.org
jkube.useOldJKubePrefix
flag to switch tojkube.io
annotation prefix in case any user is interested in this.jkube.eclipse.org
annotation prefixSigned-off-by: Rohan Kumar rohaan@redhat.com
Type of change
test, version modification, documentation, etc.)
Checklist