Move automatic login request to CRD.
Also reorganizes constants.
This commit is contained in:
parent
3152ff842b
commit
5366e24092
22 changed files with 259 additions and 206 deletions
|
|
@ -27,31 +27,47 @@ public class Constants {
|
|||
/** The Constant APP_NAME. */
|
||||
public static final String APP_NAME = "vm-runner";
|
||||
|
||||
/** The Constant VM_OP_NAME. */
|
||||
public static final String VM_OP_NAME = "vm-operator";
|
||||
/**
|
||||
* Constants related to the CRD.
|
||||
*/
|
||||
@SuppressWarnings("PMD.ShortClassName")
|
||||
public static class Crd {
|
||||
|
||||
/** The Constant VM_OP_GROUP. */
|
||||
public static final String VM_OP_GROUP = "vmoperator.jdrupes.org";
|
||||
/** The Constant NAME. */
|
||||
public static final String NAME = "vm-operator";
|
||||
|
||||
/** The Constant VM_OP_KIND_VM. */
|
||||
public static final String VM_OP_KIND_VM = "VirtualMachine";
|
||||
/** The Constant GROUP. */
|
||||
public static final String GROUP = "vmoperator.jdrupes.org";
|
||||
|
||||
/** The Constant VM_OP_KIND_VM_POOL. */
|
||||
public static final String VM_OP_KIND_VM_POOL = "VmPool";
|
||||
/** The Constant KIND_VM. */
|
||||
public static final String KIND_VM = "VirtualMachine";
|
||||
|
||||
/** The Constant COMP_DISPLAY_SECRETS. */
|
||||
public static final String COMP_DISPLAY_SECRET = "display-secret";
|
||||
/** The Constant KIND_VM_POOL. */
|
||||
public static final String KIND_VM_POOL = "VmPool";
|
||||
}
|
||||
|
||||
/** The Constant DATA_DISPLAY_PASSWORD. */
|
||||
public static final String DATA_DISPLAY_PASSWORD = "display-password";
|
||||
/**
|
||||
* Constants for the display secret.
|
||||
*/
|
||||
public static class DisplaySecret {
|
||||
|
||||
/** The Constant DATA_PASSWORD_EXPIRY. */
|
||||
public static final String DATA_PASSWORD_EXPIRY = "password-expiry";
|
||||
/** The Constant NAME. */
|
||||
public static final String NAME = "display-secret";
|
||||
|
||||
/** The Constant DATA_DISPLAY_USER. */
|
||||
public static final String DATA_DISPLAY_USER = "display-user";
|
||||
/** The Constant DISPLAY_PASSWORD. */
|
||||
public static final String DISPLAY_PASSWORD = "display-password";
|
||||
|
||||
/** The Constant DATA_DISPLAY_LOGIN. */
|
||||
public static final String DATA_DISPLAY_LOGIN = "login-user";
|
||||
/** The Constant PASSWORD_EXPIRY. */
|
||||
public static final String PASSWORD_EXPIRY = "password-expiry";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constants for status fields.
|
||||
*/
|
||||
public static class Status {
|
||||
|
||||
/** The Constant LOGGED_IN_USER. */
|
||||
public static final String LOGGED_IN_USER = "loggedInUser";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ public class K8sGenericStub<O extends KubernetesObject,
|
|||
}
|
||||
|
||||
/**
|
||||
* Updates the object's status.
|
||||
* Updates the object's status. This method will not retry.
|
||||
*
|
||||
* @param object the current state of the object (passed to `status`)
|
||||
* @param status function that returns the new status
|
||||
|
|
@ -231,7 +231,7 @@ public class K8sGenericStub<O extends KubernetesObject,
|
|||
}
|
||||
|
||||
/**
|
||||
* Updates the status.
|
||||
* Updates the status. In case of conflict, retries up to 16 times.
|
||||
*
|
||||
* @param status the status
|
||||
* @return the kubernetes api response
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue