question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ManagedKubernetesClient configuration policy should be REQUIRE

See original GitHub issue

Describe the bug

ManagedKubernetesClient does not handle activate( ) method being called with null properties. The Configuration policy should be set to ‘REQUIRE’ in order to only activate when a config is present.

Fabric8 Kubernetes Client version

5.5.0

Steps to reproduce

  1. Deploy kubernetes-client in osgi w/o a config file
  2. Observe NPE
Caused by: java.lang.NullPointerException
	at io.fabric8.kubernetes.client.osgi.ManagedKubernetesClient.activate(ManagedKubernetesClient.java:143) ~[kubernetes-client-5.3.1-bundle.jar:?]
	... 73 more

Expected behavior

Do not try to activate a ManagedKubernetesClient without a configuration file

Runtime

Kubernetes (vanilla)

Kubernetes API Server version

1.20.12

Environment

macOS

Fabric8 Kubernetes Client Logs

No response

Additional context

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rohanKanojiacommented, Sep 19, 2022

@mattrpav : You don’t have to worry about OpenShift. I will fix that as part of #3864

My question is regarding your OSGI project setup in ManagedKubernetesClient (any rough code snippet would be super helpful). I can replicate that onto OpenShift. Could you please review my reproducer to see if’s trying to reproduce correctly https://github.com/rohankanojia-forks/kubernetes-client-osgi-demo/blob/main/src/main/java/org/eclipse/jkube/quickstart/karaf/K8sBookGenerator.java#L42?

1reaction
mattrpavcommented, Sep 19, 2022

@rohanKanojia I don’t use OpenShift, so not sure how it’ll behave.

I’m happy to test out 6.x-- it’ll be a bit later this week. I’ve got 3 other oss fixes in the queue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

kubernetes-client/ManagedKubernetesClient.java at master
Unless required by applicable law or agreed to in writing, software ... "io.fabric8.kubernetes.client", policy = ConfigurationPolicy.REQUIRE).
Read more >
App configuration policies for Microsoft Intune
Learn how to use app configuration policies on an iOS/iPadOS or Android device in Microsoft Intune.
Read more >
Application Configuration policies in Intune - YouTube
Microsoft Intune is your platform for centrally managing which applications and policies your company wants to deploy across your employees' ...
Read more >
Modern Management Intune Client Apps Part IV ... - YouTube
This session is part IV of a series focused on Client Apps in Intune. This sessions specifically details App Configuration Policy.
Read more >
Microsoft Intune | Device Configuration Policies - YouTube
Intune #IntuneMDM #MDM #MobileDeviceManagementWindows Device Configuration PolicyWhat is Device Configuration policy ?How Device Profile ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found