istio-java-api icon indicating copy to clipboard operation
istio-java-api copied to clipboard

The client is using resource type 'gateways' with unstable version 'v1alpha3'

Open qhrking opened this issue 5 years ago • 2 comments

io.fabric8 kubernates-client 4.6.3 kubernetes-model 4.6.3 istio-client 1.1.1

i.f.k.c.i.VersionUsageUtils - The client is using resource type 'gateways' with unstable version 'v1alpha3'

qhrking avatar Dec 06 '19 11:12 qhrking

@qhrking could you please provide more details on what you're trying to accomplish?

metacosm avatar May 19 '20 09:05 metacosm

It's a default warning from fabric8 kubernetes client. You can see the logging code in io.fabric8.kubernetes.client.internal.VersionUsageUtils

public static void log(String type, String version) {
    if (type == null || version == null) {
      return;
    }

    if (isUnstable(version)) {
      if (LOG_EACH_USAGE || UNSTABLE_TYPES.putIfAbsent(type + "-" + version, true) == null) {
        alert(type, version);
      }
    }
  }

  private static boolean isUnstable(String version) {
    String lowerCaseVersion = version.toLowerCase(Locale.ROOT);
    return lowerCaseVersion.contains("beta") || lowerCaseVersion.contains("alpha");
  }

  private static void alert(String type, String version) {
    String message = "The client is using resource type '{}' with unstable version '{}'";
    if (type.equals("customresourcedefinitions") && version.equals("v1beta1")) {
      LOG.debug(message, type, version);
    } else {
      LOG.warn(message, type, version);
    }
  }

AndreaNicola avatar Dec 03 '20 15:12 AndreaNicola