Class K8sAdminInitializer

java.lang.Object
edu.ucsb.nceas.metacat.startup.K8sAdminInitializer

public class K8sAdminInitializer extends Object
Collection of administrative initialization tasks that need to be performed automatically on startup, when running in Kubernetes. Typically, the public initializeK8sInstance() method is called during system startup - e.g. from the servlet init() method. (In legacy deployments, these tasks are carried out manually, using the admin UI. However, this isn't possible or desirable in Kubernetes, since the site properties file is a read-only configmap)
  • Method Details

    • initializeK8sInstance

      public static void initializeK8sInstance() throws javax.servlet.ServletException
      Method to be called during system startup - e.g. from the servlet init() method . This method, in turn, will verify that this is a containerized/k8s instance, and then will perform the necessary initialization steps
      Throws:
      javax.servlet.ServletException - if anything goes wrong