snowdrop / istio-java-api

A Java API to generate Istio descriptors, inspired by Fabric8's kubernetes-model.
Apache License 2.0
112 stars 33 forks source link

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

Open qhrking opened 4 years ago

qhrking commented 4 years ago

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'

metacosm commented 4 years ago

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

AndreaNicola commented 3 years ago

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);
    }
  }