2020-03-18 17:24:33 +08:00
|
|
|
/*
|
|
|
|
|
* v1_stateful_set_spec.h
|
|
|
|
|
*
|
|
|
|
|
* A StatefulSetSpec is the specification of a StatefulSet.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _v1_stateful_set_spec_H_
|
|
|
|
|
#define _v1_stateful_set_spec_H_
|
|
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include "../external/cJSON.h"
|
|
|
|
|
#include "../include/list.h"
|
|
|
|
|
#include "../include/keyValuePair.h"
|
2020-06-20 09:41:15 +08:00
|
|
|
#include "../include/binary.h"
|
|
|
|
|
|
|
|
|
|
typedef struct v1_stateful_set_spec_t v1_stateful_set_spec_t;
|
|
|
|
|
|
2020-03-18 17:24:33 +08:00
|
|
|
#include "v1_label_selector.h"
|
|
|
|
|
#include "v1_persistent_volume_claim.h"
|
|
|
|
|
#include "v1_pod_template_spec.h"
|
2023-02-23 01:48:36 +00:00
|
|
|
#include "v1_stateful_set_ordinals.h"
|
2022-04-12 21:14:09 +08:00
|
|
|
#include "v1_stateful_set_persistent_volume_claim_retention_policy.h"
|
2020-03-18 17:24:33 +08:00
|
|
|
#include "v1_stateful_set_update_strategy.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct v1_stateful_set_spec_t {
|
2021-09-14 21:52:06 +08:00
|
|
|
int min_ready_seconds; //numeric
|
2023-02-23 01:48:36 +00:00
|
|
|
struct v1_stateful_set_ordinals_t *ordinals; //model
|
2022-04-12 21:14:09 +08:00
|
|
|
struct v1_stateful_set_persistent_volume_claim_retention_policy_t *persistent_volume_claim_retention_policy; //model
|
2022-06-05 18:16:17 +00:00
|
|
|
char *pod_management_policy; // string
|
2020-03-18 17:24:33 +08:00
|
|
|
int replicas; //numeric
|
|
|
|
|
int revision_history_limit; //numeric
|
|
|
|
|
struct v1_label_selector_t *selector; //model
|
|
|
|
|
char *service_name; // string
|
2021-01-05 15:42:34 +08:00
|
|
|
struct v1_pod_template_spec_t *_template; //model
|
2020-03-18 17:24:33 +08:00
|
|
|
struct v1_stateful_set_update_strategy_t *update_strategy; //model
|
|
|
|
|
list_t *volume_claim_templates; //nonprimitive container
|
|
|
|
|
|
|
|
|
|
} v1_stateful_set_spec_t;
|
|
|
|
|
|
|
|
|
|
v1_stateful_set_spec_t *v1_stateful_set_spec_create(
|
2021-09-14 21:52:06 +08:00
|
|
|
int min_ready_seconds,
|
2023-02-23 01:48:36 +00:00
|
|
|
v1_stateful_set_ordinals_t *ordinals,
|
2022-04-12 21:14:09 +08:00
|
|
|
v1_stateful_set_persistent_volume_claim_retention_policy_t *persistent_volume_claim_retention_policy,
|
2022-06-05 18:16:17 +00:00
|
|
|
char *pod_management_policy,
|
2020-03-18 17:24:33 +08:00
|
|
|
int replicas,
|
|
|
|
|
int revision_history_limit,
|
|
|
|
|
v1_label_selector_t *selector,
|
|
|
|
|
char *service_name,
|
2021-01-05 15:42:34 +08:00
|
|
|
v1_pod_template_spec_t *_template,
|
2020-03-18 17:24:33 +08:00
|
|
|
v1_stateful_set_update_strategy_t *update_strategy,
|
|
|
|
|
list_t *volume_claim_templates
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
void v1_stateful_set_spec_free(v1_stateful_set_spec_t *v1_stateful_set_spec);
|
|
|
|
|
|
|
|
|
|
v1_stateful_set_spec_t *v1_stateful_set_spec_parseFromJSON(cJSON *v1_stateful_set_specJSON);
|
|
|
|
|
|
|
|
|
|
cJSON *v1_stateful_set_spec_convertToJSON(v1_stateful_set_spec_t *v1_stateful_set_spec);
|
|
|
|
|
|
|
|
|
|
#endif /* _v1_stateful_set_spec_H_ */
|
|
|
|
|
|