v1alpha1

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

README

FlightCtl API

This document is intended to provide context to the API definition.

Device.Status

Conditions

These are the core conditions that cover the ability of the device to accept/manage workloads.

Name Desc
Ready True if the Device is ready and can accept new containers otherwise False. This is also the only condition which can be set by the server, otherwise False.
DiskPressure True if pressure exists on the disk size—that is, if the disk capacity is low; otherwise False.
PIDPressure True if pressure exists on the processes—that is, if there are too many processes on the node, otherwise False.
MemoryPressure True if pressure exists on the device memory—that is, if the device memory is low, otherwise False.
CPUPressure True if device is experiencing high CPU utilization that might affect the performance of the workloads running on that device, otherwise False.
SystemdUnitsRunning True is all specified systemd units are running, otherwise False.
ContainersRunning True is all specified containers are running, otherwise False.
Conditions

These conditions that cover the operation of the agent

Name Desc
Available True if the controller is available for deploying configurations and postAction commands otherwise False
Progressing True if the controller is in the process of reconciling Spec, otherwise False
Degraded True if the controllers functionality is impaired in some way but not unavailable, otherwise False

Documentation

Overview

Package v1alpha1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.

Package v1alpha1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.

Index

Constants

View Source
const (
	CertificateSigningRequestAPI      = "v1alpha1"
	CertificateSigningRequestKind     = "CertificateSigningRequest"
	CertificateSigningRequestListKind = "CertificateSigningRequestList"

	DeviceAPIVersion = "v1alpha1"
	DeviceKind       = "Device"
	DeviceListKind   = "DeviceList"

	DeviceAnnotationConsole         = "device-controller/console"
	DeviceAnnotationRenderedVersion = "device-controller/renderedVersion"
	// This annotation is populated after a device was rolled out by the fleet-rollout task
	DeviceAnnotationTemplateVersion = "fleet-controller/templateVersion"
	// This annotation is populated after a device was rendered by the device-render task
	DeviceAnnotationRenderedTemplateVersion = "fleet-controller/renderedTemplateVersion"
	// When this annotation is present, it means that the device has been selected for rollout in a batch
	DeviceAnnotationSelectedForRollout = "fleet-controller/selectedForRollout"
	DeviceAnnotationLastRolloutError   = "fleet-controller/lastRolloutError"

	// TODO: make configurable
	// DeviceDisconnectedTimeout is the duration after which a device is considered to be not reporting and set to unknown status.
	DeviceDisconnectedTimeout = 5 * time.Minute

	EnrollmentRequestAPIVersion = "v1alpha1"
	EnrollmentRequestKind       = "EnrollmentRequest"
	EnrollmentRequestListKind   = "EnrollmentRequestList"

	FleetAPIVersion = "v1alpha1"
	FleetKind       = "Fleet"
	FleetListKind   = "FleetList"

	FleetAnnotationTemplateVersion = "fleet-controller/templateVersion"
	// The last template version that has been processed by device selection reconciler.  It is used for new rollout detection
	FleetAnnotationDeployingTemplateVersion = "fleet-controller/deployingTemplateVersion"
	// The index to the current batch.  Contains an integer
	FleetAnnotationBatchNumber = "fleet-controller/batchNumber"
	// Indicates if the current batch has been approved
	FleetAnnotationRolloutApproved = "fleet-controller/rolloutApproved"
	// What is the active approval method: If automatic then it is based in the last batch success percentage.  Otherwise
	// it requires manual approval
	FleetAnnotationRolloutApprovalMethod = "fleet-controller/rolloutApprovalMethod"
	// A report specifying the completion report of the last batch
	FleetAnnotationLastBatchCompletionReport = "fleet-controller/lastBatchCompletionReport"

	RepositoryAPIVersion = "v1alpha1"
	RepositoryKind       = "Repository"
	RepositoryListKind   = "RepositoryList"

	ResourceSyncAPIVersion = "v1alpha1"
	ResourceSyncKind       = "ResourceSync"
	ResourceSyncListKind   = "ResourceSyncList"

	TemplateVersionAPIVersion = "v1alpha1"
	TemplateVersionKind       = "TemplateVersion"
	TemplateVersionListKind   = "TemplateVersionList"
)
View Source
const (
	// No rollout is currently active
	RolloutInactiveReason = "Inactive"
	// Rollout is in progress
	RolloutActiveReason = "Active"
	// Rollout is suspended
	RolloutSuspendedReason = "Suspended"
	// Rollout is pending on user approval
	RolloutWaitingReason = "Waiting"
)
View Source
const (
	DeviceConditionBootstrapReason = "Bootstrapping"
)
View Source
const (

	// MaxDNSNameLength defines the maximum length of a DNS-1123 compliant name,
	// as specified by RFC 1123. It is used to validate the length of strings
	// that must conform to DNS naming requirements.
	MaxDNSNameLength = 253
)

Variables

View Source
var ErrStartGraceDurationExceedsCronInterval = errors.New("startGraceDuration exceeds the cron interval between schedule times")

Functions

func DeviceSpecsAreEqual added in v0.3.0

func DeviceSpecsAreEqual(d1, d2 DeviceSpec) bool

func ExecuteGoTemplateOnDevice added in v0.4.0

func ExecuteGoTemplateOnDevice(t *template.Template, dev *Device) (string, error)

This function wraps template.Execute. Instead of passing the device directly, it converts it into a map first. This has two purposes: 1. The user-provided template uses the yaml/json API format (e.g., lower case) 2. The map contains only the device fields we allow access to

func FleetSpecsAreEqual added in v0.3.0

func FleetSpecsAreEqual(f1, f2 FleetSpec) bool

func GetGoTemplateFuncMap added in v0.4.0

func GetGoTemplateFuncMap() template.FuncMap

Some functions that we provide to users. In case of a missing label, we may get an interface{} rather than string because ExecuteGoTemplateOnDevice() converts the Device struct to a map. Therefore our functions here need to ensure we get a string, and if not then they return an empty string. Note that this will only happen if the "missingkey=zero" option is used in the template. If "missingkey=error" is used, the template execution will fail and we won't get to this point.

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func IsStatusConditionFalse

func IsStatusConditionFalse(conditions []Condition, conditionType ConditionType) bool

IsStatusConditionFalse returns true when the conditionType is present and set to `ConditionFalse`

func IsStatusConditionPresentAndEqual

func IsStatusConditionPresentAndEqual(conditions []Condition, conditionType ConditionType, status ConditionStatus) bool

IsStatusConditionPresentAndEqual returns true when conditionType is present and equal to status.

func IsStatusConditionTrue

func IsStatusConditionTrue(conditions []Condition, conditionType ConditionType) bool

IsStatusConditionTrue returns true when the conditionType is present and set to `ConditionTrue`

func MatchExpressionsToString added in v0.4.0

func MatchExpressionsToString(exprs ...MatchExpression) string

MatchExpressionsToString converts a list of MatchExpressions into a formatted string. Each MatchExpression is represented by its string form, separated by ", ".

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func PercentageAsInt added in v0.4.0

func PercentageAsInt(p Percentage) (int, error)

func RemoveStatusCondition

func RemoveStatusCondition(conditions *[]Condition, conditionType ConditionType) (removed bool)

RemoveStatusCondition removes the corresponding conditionType from conditions if present. Returns true if it was present and got removed. conditions must be non-nil.

func SetStatusCondition

func SetStatusCondition(conditions *[]Condition, newCondition Condition) (changed bool)

SetStatusCondition sets the corresponding condition in conditions to newCondition and returns true if the conditions are changed by this call. conditions must be non-nil.

  1. if the condition of the specified type already exists (all fields of the existing condition are updated to newCondition, LastTransitionTime is set to now if the new status differs from the old status)
  2. if a condition of the specified type does not exist (LastTransitionTime is set to now() if unset, and newCondition is appended)

func SetStatusConditionByError

func SetStatusConditionByError(conditions *[]Condition, conditionType ConditionType, okReason string, failReason string, err error) (changed bool)

func ValidateConditions added in v0.4.0

func ValidateConditions(conditions []Condition, allowedConditions, trueConditions, exclusiveConditions []ConditionType) []error

Types

type ApplicationEnvVars added in v0.3.0

type ApplicationEnvVars struct {
	// EnvVars Environment variable key-value pairs, injected during runtime. The key and value each must be between 1 and 253 characters.
	EnvVars *map[string]string `json:"envVars,omitempty"`
}

ApplicationEnvVars defines model for ApplicationEnvVars.

type ApplicationProviderType added in v0.3.0

type ApplicationProviderType string
const (
	ImageApplicationProviderType ApplicationProviderType = "image"
)

type ApplicationSpec added in v0.3.0

type ApplicationSpec struct {
	// EnvVars Environment variable key-value pairs, injected during runtime. The key and value each must be between 1 and 253 characters.
	EnvVars *map[string]string `json:"envVars,omitempty"`

	// Name The name of the application must be between 1 and 253 characters and start with a letter or number.
	Name *string `json:"name,omitempty"`
	// contains filtered or unexported fields
}

ApplicationSpec defines model for ApplicationSpec.

func (ApplicationSpec) AsImageApplicationProvider added in v0.3.0

func (t ApplicationSpec) AsImageApplicationProvider() (ImageApplicationProvider, error)

AsImageApplicationProvider returns the union data inside the ApplicationSpec as a ImageApplicationProvider

func (*ApplicationSpec) FromImageApplicationProvider added in v0.3.0

func (t *ApplicationSpec) FromImageApplicationProvider(v ImageApplicationProvider) error

FromImageApplicationProvider overwrites any union data inside the ApplicationSpec as the provided ImageApplicationProvider

func (ApplicationSpec) MarshalJSON added in v0.3.0

func (t ApplicationSpec) MarshalJSON() ([]byte, error)

func (*ApplicationSpec) MergeImageApplicationProvider added in v0.3.0

func (t *ApplicationSpec) MergeImageApplicationProvider(v ImageApplicationProvider) error

MergeImageApplicationProvider performs a merge with any union data inside the ApplicationSpec, using the provided ImageApplicationProvider

func (ApplicationSpec) Type added in v0.3.0

Type returns the type of the application provider.

func (*ApplicationSpec) UnmarshalJSON added in v0.3.0

func (t *ApplicationSpec) UnmarshalJSON(b []byte) error

func (ApplicationSpec) Validate added in v0.3.0

func (a ApplicationSpec) Validate() []error

type ApplicationStatusType

type ApplicationStatusType string

ApplicationStatusType Status of a single application on the device.

const (
	ApplicationStatusCompleted ApplicationStatusType = "Completed"
	ApplicationStatusError     ApplicationStatusType = "Error"
	ApplicationStatusPreparing ApplicationStatusType = "Preparing"
	ApplicationStatusRunning   ApplicationStatusType = "Running"
	ApplicationStatusStarting  ApplicationStatusType = "Starting"
	ApplicationStatusUnknown   ApplicationStatusType = "Unknown"
)

Defines values for ApplicationStatusType.

type ApplicationsSummaryStatusType

type ApplicationsSummaryStatusType string

ApplicationsSummaryStatusType Status of all applications on the device.

const (
	ApplicationsSummaryStatusDegraded ApplicationsSummaryStatusType = "Degraded"
	ApplicationsSummaryStatusError    ApplicationsSummaryStatusType = "Error"
	ApplicationsSummaryStatusHealthy  ApplicationsSummaryStatusType = "Healthy"
	ApplicationsSummaryStatusUnknown  ApplicationsSummaryStatusType = "Unknown"
)

Defines values for ApplicationsSummaryStatusType.

type ApproveEnrollmentRequestJSONRequestBody

type ApproveEnrollmentRequestJSONRequestBody = EnrollmentRequestApproval

ApproveEnrollmentRequestJSONRequestBody defines body for ApproveEnrollmentRequest for application/json ContentType.

type AuthConfig

type AuthConfig struct {
	// AuthType Auth type.
	AuthType string `json:"authType"`

	// AuthURL Auth URL.
	AuthURL string `json:"authURL"`
}

AuthConfig Auth config.

type AuthValidateParams

type AuthValidateParams struct {
	// Authentication The authentication token to validate.
	Authentication *string `json:"Authentication,omitempty"`
}

AuthValidateParams defines parameters for AuthValidate.

type Batch added in v0.3.0

type Batch struct {
	// Limit The maximum number or percentage of devices to update in the batch.
	Limit *Batch_Limit `json:"limit,omitempty"`

	// Selector A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. Empty/null label selectors match nothing.
	Selector *LabelSelector `json:"selector,omitempty"`

	// SuccessThreshold Percentage is the string format representing percentage string.
	SuccessThreshold *Percentage `json:"successThreshold,omitempty"`
}

Batch Batch is an element in batch sequence.

func (*Batch) Validate added in v0.4.0

func (b *Batch) Validate() []error

type BatchLimit1 added in v0.3.0

type BatchLimit1 = int

BatchLimit1 defines model for .

type BatchSequence added in v0.3.0

type BatchSequence struct {
	// Sequence A list of batch definitions.
	Sequence *[]Batch `json:"sequence,omitempty"`

	// Strategy The strategy of choice for device selection in rollout policy.
	Strategy RolloutStrategy `json:"strategy"`
}

BatchSequence BatchSequence defines the list of batches to be executed in sequence.

func (BatchSequence) Validate added in v0.4.0

func (b BatchSequence) Validate() []error

type Batch_Limit added in v0.3.0

type Batch_Limit struct {
	// contains filtered or unexported fields
}

Batch_Limit The maximum number or percentage of devices to update in the batch.

func (Batch_Limit) AsBatchLimit1 added in v0.3.0

func (t Batch_Limit) AsBatchLimit1() (BatchLimit1, error)

AsBatchLimit1 returns the union data inside the Batch_Limit as a BatchLimit1

func (Batch_Limit) AsPercentage added in v0.3.0

func (t Batch_Limit) AsPercentage() (Percentage, error)

AsPercentage returns the union data inside the Batch_Limit as a Percentage

func (*Batch_Limit) FromBatchLimit1 added in v0.3.0

func (t *Batch_Limit) FromBatchLimit1(v BatchLimit1) error

FromBatchLimit1 overwrites any union data inside the Batch_Limit as the provided BatchLimit1

func (*Batch_Limit) FromPercentage added in v0.3.0

func (t *Batch_Limit) FromPercentage(v Percentage) error

FromPercentage overwrites any union data inside the Batch_Limit as the provided Percentage

func (Batch_Limit) MarshalJSON added in v0.3.0

func (t Batch_Limit) MarshalJSON() ([]byte, error)

func (*Batch_Limit) MergeBatchLimit1 added in v0.3.0

func (t *Batch_Limit) MergeBatchLimit1(v BatchLimit1) error

MergeBatchLimit1 performs a merge with any union data inside the Batch_Limit, using the provided BatchLimit1

func (*Batch_Limit) MergePercentage added in v0.3.0

func (t *Batch_Limit) MergePercentage(v Percentage) error

MergePercentage performs a merge with any union data inside the Batch_Limit, using the provided Percentage

func (*Batch_Limit) UnmarshalJSON added in v0.3.0

func (t *Batch_Limit) UnmarshalJSON(b []byte) error

type CertificateSigningRequest

type CertificateSigningRequest struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
	Metadata ObjectMeta `json:"metadata"`

	// Spec Wrapper around a user-created CSR, modeled on kubernetes io.k8s.api.certificates.v1.CertificateSigningRequestSpec.
	Spec CertificateSigningRequestSpec `json:"spec"`

	// Status Indicates approval/denial/failure status of the CSR, and contains the issued certifiate if any exists.
	Status *CertificateSigningRequestStatus `json:"status,omitempty"`
}

CertificateSigningRequest CertificateSigningRequest represents a request for a signed certificate from the CA.

func (CertificateSigningRequest) Validate

func (r CertificateSigningRequest) Validate() []error

type CertificateSigningRequestList

type CertificateSigningRequestList struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Items List of CertificateSigningRequest.
	Items []CertificateSigningRequest `json:"items"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
	Metadata ListMeta `json:"metadata"`
}

CertificateSigningRequestList CertificateSigningRequestList is a list of CertificateSigningRequest.

type CertificateSigningRequestSpec

type CertificateSigningRequestSpec struct {
	// ExpirationSeconds Requested duration of validity for the certificate.
	ExpirationSeconds *int32 `json:"expirationSeconds,omitempty"`

	// Extra Extra attributes of the user that created the CSR, populated by the API server on creation and immutable.
	Extra *map[string][]string `json:"extra,omitempty"`

	// Request The base64-encoded PEM-encoded PKCS#10 CSR. Matches the spec.request field in a kubernetes CertificateSigningRequest resource.
	Request []byte `json:"request"`

	// SignerName Indicates the requested signer, and is a qualified name.
	SignerName string `json:"signerName"`

	// Uid UID of the user that created the CSR, populated by the API server on creation and immutable.
	Uid *string `json:"uid,omitempty"`

	// Usages Usages specifies a set of key usages requested in the issued certificate.
	Usages *[]string `json:"usages,omitempty"`

	// Username Name of the user that created the CSR, populated by the API server on creation and immutable.
	Username *string `json:"username,omitempty"`
}

CertificateSigningRequestSpec Wrapper around a user-created CSR, modeled on kubernetes io.k8s.api.certificates.v1.CertificateSigningRequestSpec.

type CertificateSigningRequestStatus

type CertificateSigningRequestStatus struct {
	// Certificate The issued signed certificate, immutable once populated.
	Certificate *[]byte `json:"certificate,omitempty"`

	// Conditions Conditions applied to the request. Known conditions are Approved, Denied, and Failed.
	Conditions []Condition `json:"conditions"`
}

CertificateSigningRequestStatus Indicates approval/denial/failure status of the CSR, and contains the issued certifiate if any exists.

type Condition

type Condition struct {
	// LastTransitionTime The last time the condition transitioned from one status to another.
	LastTransitionTime time.Time `json:"lastTransitionTime"`

	// Message Human readable message indicating details about last transition.
	Message string `json:"message"`

	// ObservedGeneration The .metadata.generation that the condition was set based upon.
	ObservedGeneration *int64 `json:"observedGeneration,omitempty"`

	// Reason A (brief) reason for the condition's last transition.
	Reason string `json:"reason"`

	// Status Status of the condition, one of True, False, Unknown.
	Status ConditionStatus `json:"status"`

	// Type Type of condition in CamelCase.
	Type ConditionType `json:"type"`
}

Condition Condition contains details for one aspect of the current state of this API Resource.

func FindStatusCondition

func FindStatusCondition(conditions []Condition, conditionType ConditionType) *Condition

FindStatusCondition finds the conditionType in conditions.

type ConditionStatus

type ConditionStatus string

ConditionStatus Status of the condition, one of True, False, Unknown.

const (
	ConditionStatusFalse   ConditionStatus = "False"
	ConditionStatusTrue    ConditionStatus = "True"
	ConditionStatusUnknown ConditionStatus = "Unknown"
)

Defines values for ConditionStatus.

type ConditionType

type ConditionType string

ConditionType Type of condition in CamelCase.

const (
	CertificateSigningRequestApproved ConditionType = "Approved"
	CertificateSigningRequestDenied   ConditionType = "Denied"
	CertificateSigningRequestFailed   ConditionType = "Failed"
	DeviceDecommissioning             ConditionType = "DeviceDecommissioning"
	DeviceMultipleOwners              ConditionType = "MultipleOwners"
	DeviceSpecValid                   ConditionType = "SpecValid"
	DeviceUpdating                    ConditionType = "Updating"
	EnrollmentRequestApproved         ConditionType = "Approved"
	FleetOverlappingSelectors         ConditionType = "OverlappingSelectors"
	FleetRolloutInProgress            ConditionType = "RolloutInProgress"
	FleetValid                        ConditionType = "Valid"
	RepositoryAccessible              ConditionType = "Accessible"
	ResourceSyncAccessible            ConditionType = "Accessible"
	ResourceSyncResourceParsed        ConditionType = "ResourceParsed"
	ResourceSyncSynced                ConditionType = "Synced"
)

Defines values for ConditionType.

type ConfigProviderSpec added in v0.3.0

type ConfigProviderSpec struct {
	// contains filtered or unexported fields
}

ConfigProviderSpec defines model for ConfigProviderSpec.

func (ConfigProviderSpec) AsGitConfigProviderSpec added in v0.3.0

func (t ConfigProviderSpec) AsGitConfigProviderSpec() (GitConfigProviderSpec, error)

AsGitConfigProviderSpec returns the union data inside the ConfigProviderSpec as a GitConfigProviderSpec

func (ConfigProviderSpec) AsHttpConfigProviderSpec added in v0.3.0

func (t ConfigProviderSpec) AsHttpConfigProviderSpec() (HttpConfigProviderSpec, error)

AsHttpConfigProviderSpec returns the union data inside the ConfigProviderSpec as a HttpConfigProviderSpec

func (ConfigProviderSpec) AsInlineConfigProviderSpec added in v0.3.0

func (t ConfigProviderSpec) AsInlineConfigProviderSpec() (InlineConfigProviderSpec, error)

AsInlineConfigProviderSpec returns the union data inside the ConfigProviderSpec as a InlineConfigProviderSpec

func (ConfigProviderSpec) AsKubernetesSecretProviderSpec added in v0.3.0

func (t ConfigProviderSpec) AsKubernetesSecretProviderSpec() (KubernetesSecretProviderSpec, error)

AsKubernetesSecretProviderSpec returns the union data inside the ConfigProviderSpec as a KubernetesSecretProviderSpec

func (*ConfigProviderSpec) FromGitConfigProviderSpec added in v0.3.0

func (t *ConfigProviderSpec) FromGitConfigProviderSpec(v GitConfigProviderSpec) error

FromGitConfigProviderSpec overwrites any union data inside the ConfigProviderSpec as the provided GitConfigProviderSpec

func (*ConfigProviderSpec) FromHttpConfigProviderSpec added in v0.3.0

func (t *ConfigProviderSpec) FromHttpConfigProviderSpec(v HttpConfigProviderSpec) error

FromHttpConfigProviderSpec overwrites any union data inside the ConfigProviderSpec as the provided HttpConfigProviderSpec

func (*ConfigProviderSpec) FromInlineConfigProviderSpec added in v0.3.0

func (t *ConfigProviderSpec) FromInlineConfigProviderSpec(v InlineConfigProviderSpec) error

FromInlineConfigProviderSpec overwrites any union data inside the ConfigProviderSpec as the provided InlineConfigProviderSpec

func (*ConfigProviderSpec) FromKubernetesSecretProviderSpec added in v0.3.0

func (t *ConfigProviderSpec) FromKubernetesSecretProviderSpec(v KubernetesSecretProviderSpec) error

FromKubernetesSecretProviderSpec overwrites any union data inside the ConfigProviderSpec as the provided KubernetesSecretProviderSpec

func (ConfigProviderSpec) MarshalJSON added in v0.3.0

func (t ConfigProviderSpec) MarshalJSON() ([]byte, error)

func (*ConfigProviderSpec) MergeGitConfigProviderSpec added in v0.3.0

func (t *ConfigProviderSpec) MergeGitConfigProviderSpec(v GitConfigProviderSpec) error

MergeGitConfigProviderSpec performs a merge with any union data inside the ConfigProviderSpec, using the provided GitConfigProviderSpec

func (*ConfigProviderSpec) MergeHttpConfigProviderSpec added in v0.3.0

func (t *ConfigProviderSpec) MergeHttpConfigProviderSpec(v HttpConfigProviderSpec) error

MergeHttpConfigProviderSpec performs a merge with any union data inside the ConfigProviderSpec, using the provided HttpConfigProviderSpec

func (*ConfigProviderSpec) MergeInlineConfigProviderSpec added in v0.3.0

func (t *ConfigProviderSpec) MergeInlineConfigProviderSpec(v InlineConfigProviderSpec) error

MergeInlineConfigProviderSpec performs a merge with any union data inside the ConfigProviderSpec, using the provided InlineConfigProviderSpec

func (*ConfigProviderSpec) MergeKubernetesSecretProviderSpec added in v0.3.0

func (t *ConfigProviderSpec) MergeKubernetesSecretProviderSpec(v KubernetesSecretProviderSpec) error

MergeKubernetesSecretProviderSpec performs a merge with any union data inside the ConfigProviderSpec, using the provided KubernetesSecretProviderSpec

func (ConfigProviderSpec) Type added in v0.3.0

Type returns the type of the config provider.

func (*ConfigProviderSpec) UnmarshalJSON added in v0.3.0

func (t *ConfigProviderSpec) UnmarshalJSON(b []byte) error

func (ConfigProviderSpec) Validate added in v0.3.0

func (c ConfigProviderSpec) Validate(fleetTemplate bool) []error

type ConfigProviderType added in v0.3.0

type ConfigProviderType string
const (
	GitConfigProviderType        ConfigProviderType = "gitRef"
	HttpConfigProviderType       ConfigProviderType = "httpRef"
	InlineConfigProviderType     ConfigProviderType = "inline"
	KubernetesSecretProviderType ConfigProviderType = "secretRef"
)

type CpuResourceMonitorSpec added in v0.4.0

type CpuResourceMonitorSpec = ResourceMonitorSpec

CpuResourceMonitorSpec Specification for monitoring a resource.

type CreateCertificateSigningRequestJSONRequestBody

type CreateCertificateSigningRequestJSONRequestBody = CertificateSigningRequest

CreateCertificateSigningRequestJSONRequestBody defines body for CreateCertificateSigningRequest for application/json ContentType.

type CreateDeviceJSONRequestBody

type CreateDeviceJSONRequestBody = Device

CreateDeviceJSONRequestBody defines body for CreateDevice for application/json ContentType.

type CreateEnrollmentRequestJSONRequestBody

type CreateEnrollmentRequestJSONRequestBody = EnrollmentRequest

CreateEnrollmentRequestJSONRequestBody defines body for CreateEnrollmentRequest for application/json ContentType.

type CreateFleetJSONRequestBody

type CreateFleetJSONRequestBody = Fleet

CreateFleetJSONRequestBody defines body for CreateFleet for application/json ContentType.

type CreateRepositoryJSONRequestBody

type CreateRepositoryJSONRequestBody = Repository

CreateRepositoryJSONRequestBody defines body for CreateRepository for application/json ContentType.

type CreateResourceSyncJSONRequestBody

type CreateResourceSyncJSONRequestBody = ResourceSync

CreateResourceSyncJSONRequestBody defines body for CreateResourceSync for application/json ContentType.

type CronExpression added in v0.4.0

type CronExpression = string

CronExpression Cron expression format for scheduling times. The format is `* * * * *`: - Minutes: `*` matches 0-59. - Hours: `*` matches 0-23. - Day of Month: `*` matches 1-31. - Month: `*` matches 1-12. - Day of Week: `*` matches 0-6. Supported operators: - `*`: Matches any value (e.g., `*` in hours matches every hour). - `-`: Range (e.g., `0-8` for 12 AM to 8 AM). - `,`: List (e.g., `1,12` for 1st and 12th minute). - `/`: Step (e.g., `*/12` for every 12th minute). - Single value (e.g., `8` matches the 8th minute). Example: `* 0-8,16-23 * * *`.

type CustomResourceMonitorSpec

type CustomResourceMonitorSpec struct {
	// AlertRules Array of alert rules. Only one alert per severity is allowed.
	AlertRules []ResourceAlertRule `json:"alertRules"`

	// MonitorType The type of resource to monitor.
	MonitorType string `json:"monitorType"`

	// SamplingInterval Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours.
	SamplingInterval string `json:"samplingInterval"`
}

CustomResourceMonitorSpec defines model for CustomResourceMonitorSpec.

type DecommissionDeviceJSONRequestBody added in v0.4.0

type DecommissionDeviceJSONRequestBody = DeviceDecommission

DecommissionDeviceJSONRequestBody defines body for DecommissionDevice for application/json ContentType.

type DecommissionState added in v0.4.0

type DecommissionState string
const (
	// The agent has received the request to decommission from the service.
	DecommissionStateStarted DecommissionState = "Started"
	// The agent has completed its decommissioning actions.
	DecommissionStateComplete DecommissionState = "Completed"
	// The agent has encoutered an error while decommissioning.
	DecommissionStateError DecommissionState = "Error"
)

type Device

type Device struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
	Metadata ObjectMeta `json:"metadata"`

	// Spec DeviceSpec describes a device.
	Spec *DeviceSpec `json:"spec,omitempty"`

	// Status DeviceStatus represents information about the status of a device. Status may trail the actual state of a device.
	Status *DeviceStatus `json:"status,omitempty"`
}

Device Device represents a physical device.

func (*Device) IsDecommissioning added in v0.4.0

func (d *Device) IsDecommissioning() bool

IsDecommissioning() is true if the device has added a DeviceDecommissioning ConditionType to its Conditions.

func (*Device) IsDisconnected added in v0.4.0

func (d *Device) IsDisconnected(disconnectTimeout time.Duration) bool

IsDisconnected() is true if the device never updated status or its last status update is older than disconnectTimeout.

func (*Device) IsManaged added in v0.4.0

func (d *Device) IsManaged() bool

IsManaged() if the device has its owner field set.

func (*Device) IsManagedBy added in v0.4.0

func (d *Device) IsManagedBy(f *Fleet) bool

IsManagedBy() is true if the device is managed by the given fleet.

func (*Device) IsRebooting added in v0.4.0

func (d *Device) IsRebooting() bool

IsRebooting() is true if the device's agent has the updating condition set with state Rebooting.

func (*Device) IsUpdatedToDeviceSpec added in v0.4.0

func (d *Device) IsUpdatedToDeviceSpec() bool

IsUpdatedToDeviceSpec() is true if the device's current rendered version matches its spec's rendered version.

func (*Device) IsUpdatedToFleetSpec added in v0.4.0

func (d *Device) IsUpdatedToFleetSpec(f *Fleet) bool

IsUpdatedToFleetSpec() is true if the IsUpdatedToDeviceSpec() and device spec's current rendered version matches its fleet's rendered version.

func (*Device) IsUpdating added in v0.4.0

func (d *Device) IsUpdating() bool

IsUpdating() is true if the device's agent reports that it is updating.

func (Device) Validate

func (r Device) Validate() []error

type DeviceApplicationStatus added in v0.3.0

type DeviceApplicationStatus struct {
	// Name Human readable name of the application.
	Name string `json:"name"`

	// Ready The number of containers which are ready in the application.
	Ready string `json:"ready"`

	// Restarts Number of restarts observed for the application.
	Restarts int `json:"restarts"`

	// Status Status of a single application on the device.
	Status ApplicationStatusType `json:"status"`
}

DeviceApplicationStatus defines model for DeviceApplicationStatus.

type DeviceApplicationsSummaryStatus added in v0.3.0

type DeviceApplicationsSummaryStatus struct {
	// Info Human readable information detailing the last application transition.
	Info *string `json:"info,omitempty"`

	// Status Status of all applications on the device.
	Status ApplicationsSummaryStatusType `json:"status"`
}

DeviceApplicationsSummaryStatus A summary of the health of applications on the device.

type DeviceConfigStatus

type DeviceConfigStatus struct {
	// RenderedVersion Version of the device rendered config.
	RenderedVersion string `json:"renderedVersion"`
}

DeviceConfigStatus Current status of the device config.

type DeviceConsole

type DeviceConsole struct {
	// GRPCEndpoint The gRPC endpoint for the console connection.
	GRPCEndpoint string `json:"gRPCEndpoint"`

	// SessionID The session ID for the console connection.
	SessionID string `json:"sessionID"`
}

DeviceConsole DeviceConsole represents the console connection information.

type DeviceDecommission added in v0.4.0

type DeviceDecommission struct {
	// Target Specifies the desired decommissioning method of the device.
	Target DeviceDecommissionTargetType `json:"target"`
}

DeviceDecommission Metadata about a device decommissioning request.

type DeviceDecommissionTargetType added in v0.4.0

type DeviceDecommissionTargetType string

DeviceDecommissionTargetType Specifies the desired decommissioning method of the device.

const (
	DeviceDecommissionTargetTypeFactoryReset DeviceDecommissionTargetType = "FactoryReset"
	DeviceDecommissionTargetTypeUnenroll     DeviceDecommissionTargetType = "Unenroll"
)

Defines values for DeviceDecommissionTargetType.

type DeviceIntegrityStatus

type DeviceIntegrityStatus struct {
	// Info Human readable information about the last integrity transition.
	Info *string `json:"info,omitempty"`

	// Status Status of the integrity of the device.
	Status DeviceIntegrityStatusSummaryType `json:"status"`
}

DeviceIntegrityStatus Summary status of the integrity of the device.

type DeviceIntegrityStatusSummaryType

type DeviceIntegrityStatusSummaryType string

DeviceIntegrityStatusSummaryType Status of the integrity of the device.

const (
	DeviceIntegrityStatusFailed      DeviceIntegrityStatusSummaryType = "Failed"
	DeviceIntegrityStatusPassed      DeviceIntegrityStatusSummaryType = "Passed"
	DeviceIntegrityStatusUnknown     DeviceIntegrityStatusSummaryType = "Unknown"
	DeviceIntegrityStatusUnsupported DeviceIntegrityStatusSummaryType = "Unsupported"
)

Defines values for DeviceIntegrityStatusSummaryType.

type DeviceLifecycleHookType added in v0.4.0

type DeviceLifecycleHookType string

DeviceLifecycleHookType defines model for DeviceLifecycleHookType.

const (
	DeviceLifecycleHookAfterRebooting  DeviceLifecycleHookType = "AfterRebooting"
	DeviceLifecycleHookAfterUpdating   DeviceLifecycleHookType = "AfterUpdating"
	DeviceLifecycleHookBeforeRebooting DeviceLifecycleHookType = "BeforeRebooting"
	DeviceLifecycleHookBeforeUpdating  DeviceLifecycleHookType = "BeforeUpdating"
)

Defines values for DeviceLifecycleHookType.

type DeviceLifecycleStatus added in v0.4.0

type DeviceLifecycleStatus struct {
	// Info Human readable information about the device lifecycle status.
	Info *string `json:"info,omitempty"`

	// Status Status type of the device lifecycle.
	Status DeviceLifecycleStatusType `json:"status"`
}

DeviceLifecycleStatus Current status of the device lifecycle.

type DeviceLifecycleStatusType added in v0.4.0

type DeviceLifecycleStatusType string

DeviceLifecycleStatusType Status type of the device lifecycle.

const (
	DeviceLifecycleStatusDecommissioned  DeviceLifecycleStatusType = "Decommissioned"
	DeviceLifecycleStatusDecommissioning DeviceLifecycleStatusType = "Decommissioning"
	DeviceLifecycleStatusEnrolled        DeviceLifecycleStatusType = "Enrolled"
	DeviceLifecycleStatusUnknown         DeviceLifecycleStatusType = "Unknown"
)

Defines values for DeviceLifecycleStatusType.

type DeviceList

type DeviceList struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Items List of Devices.
	Items []Device `json:"items"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
	Metadata ListMeta `json:"metadata"`

	// Summary A summary of the devices in the fleet returned when fetching a single Fleet.
	Summary *DevicesSummary `json:"summary,omitempty"`
}

DeviceList DeviceList is a list of Devices.

type DeviceOsSpec added in v0.4.0

type DeviceOsSpec struct {
	// Image The target OS image name or URL.
	Image string `json:"image"`
}

DeviceOsSpec DeviceOsSpec describes the target OS for the device.

type DeviceOsStatus added in v0.4.0

type DeviceOsStatus struct {
	// Image Version of the OS image.
	Image string `json:"image"`

	// ImageDigest The digest of the OS image (e.g. sha256:a0...).
	ImageDigest string `json:"imageDigest"`
}

DeviceOsStatus Current status of the device OS.

type DeviceResourceStatus

type DeviceResourceStatus struct {
	// Cpu The types of resource statuses.
	Cpu DeviceResourceStatusType `json:"cpu"`

	// Disk The types of resource statuses.
	Disk DeviceResourceStatusType `json:"disk"`

	// Memory The types of resource statuses.
	Memory DeviceResourceStatusType `json:"memory"`
}

DeviceResourceStatus Current status of the resources of the device.

type DeviceResourceStatusType

type DeviceResourceStatusType string

DeviceResourceStatusType The types of resource statuses.

const (
	DeviceResourceStatusCritical DeviceResourceStatusType = "Critical"
	DeviceResourceStatusError    DeviceResourceStatusType = "Error"
	DeviceResourceStatusHealthy  DeviceResourceStatusType = "Healthy"
	DeviceResourceStatusUnknown  DeviceResourceStatusType = "Unknown"
	DeviceResourceStatusWarning  DeviceResourceStatusType = "Warning"
)

Defines values for DeviceResourceStatusType.

type DeviceSpec

type DeviceSpec struct {
	// Applications List of applications.
	Applications *[]ApplicationSpec `json:"applications,omitempty"`

	// Config List of config providers.
	Config *[]ConfigProviderSpec `json:"config,omitempty"`

	// Decommissioning Metadata about a device decommissioning request.
	Decommissioning *DeviceDecommission `json:"decommissioning,omitempty"`

	// Os DeviceOsSpec describes the target OS for the device.
	Os *DeviceOsSpec `json:"os,omitempty"`

	// Resources Array of resource monitor configurations.
	Resources *[]ResourceMonitor `json:"resources,omitempty"`

	// Systemd The systemd services to monitor.
	Systemd *struct {
		// MatchPatterns A list of match patterns.
		MatchPatterns *[]string `json:"matchPatterns,omitempty"`
	} `json:"systemd,omitempty"`

	// UpdatePolicy Specifies the policy for managing device updates, including when updates should be downloaded and applied.
	UpdatePolicy *DeviceUpdatePolicySpec `json:"updatePolicy,omitempty"`
}

DeviceSpec DeviceSpec describes a device.

func (DeviceSpec) Validate added in v0.4.0

func (r DeviceSpec) Validate(fleetTemplate bool) []error

type DeviceStatus

type DeviceStatus struct {
	// Applications List of device application status.
	Applications []DeviceApplicationStatus `json:"applications"`

	// ApplicationsSummary A summary of the health of applications on the device.
	ApplicationsSummary DeviceApplicationsSummaryStatus `json:"applicationsSummary"`

	// Conditions Conditions represent the observations of a the current state of a device.
	Conditions []Condition `json:"conditions"`

	// Config Current status of the device config.
	Config DeviceConfigStatus `json:"config"`

	// Integrity Summary status of the integrity of the device.
	Integrity DeviceIntegrityStatus `json:"integrity"`

	// LastSeen The last time the device was seen by the service.
	LastSeen time.Time `json:"lastSeen"`

	// Lifecycle Current status of the device lifecycle.
	Lifecycle DeviceLifecycleStatus `json:"lifecycle"`

	// Os Current status of the device OS.
	Os DeviceOsStatus `json:"os"`

	// Resources Current status of the resources of the device.
	Resources DeviceResourceStatus `json:"resources"`

	// Summary A summary of the health of the device hardware and operating system resources.
	Summary DeviceSummaryStatus `json:"summary"`

	// SystemInfo DeviceSystemInfo is a set of ids/uuids to uniquely identify the device.
	SystemInfo DeviceSystemInfo `json:"systemInfo"`

	// Updated Current status of the device update.
	Updated DeviceUpdatedStatus `json:"updated"`
}

DeviceStatus DeviceStatus represents information about the status of a device. Status may trail the actual state of a device.

func NewDeviceStatus

func NewDeviceStatus() DeviceStatus

type DeviceSummaryStatus

type DeviceSummaryStatus struct {
	// Info Human readable information detailing the last device status transition.
	Info *string `json:"info,omitempty"`

	// Status Status of the device.
	Status DeviceSummaryStatusType `json:"status"`
}

DeviceSummaryStatus A summary of the health of the device hardware and operating system resources.

type DeviceSummaryStatusType

type DeviceSummaryStatusType string

DeviceSummaryStatusType Status of the device.

const (
	DeviceSummaryStatusDegraded   DeviceSummaryStatusType = "Degraded"
	DeviceSummaryStatusError      DeviceSummaryStatusType = "Error"
	DeviceSummaryStatusOnline     DeviceSummaryStatusType = "Online"
	DeviceSummaryStatusPoweredOff DeviceSummaryStatusType = "PoweredOff"
	DeviceSummaryStatusRebooting  DeviceSummaryStatusType = "Rebooting"
	DeviceSummaryStatusUnknown    DeviceSummaryStatusType = "Unknown"
)

Defines values for DeviceSummaryStatusType.

type DeviceSystemInfo

type DeviceSystemInfo struct {
	// Architecture The Architecture reported by the device.
	Architecture string `json:"architecture"`

	// BootID Boot ID reported by the device.
	BootID string `json:"bootID"`

	// OperatingSystem The Operating System reported by the device.
	OperatingSystem string `json:"operatingSystem"`
}

DeviceSystemInfo DeviceSystemInfo is a set of ids/uuids to uniquely identify the device.

func (*DeviceSystemInfo) IsEmpty

func (d *DeviceSystemInfo) IsEmpty() bool

type DeviceUpdatePolicySpec added in v0.4.0

type DeviceUpdatePolicySpec struct {
	// DownloadSchedule Defines the schedule for automatic downloading and updates, including timing and optional timeout.
	DownloadSchedule *UpdateSchedule `json:"downloadSchedule,omitempty"`

	// UpdateSchedule Defines the schedule for automatic downloading and updates, including timing and optional timeout.
	UpdateSchedule *UpdateSchedule `json:"updateSchedule,omitempty"`
}

DeviceUpdatePolicySpec Specifies the policy for managing device updates, including when updates should be downloaded and applied.

func (DeviceUpdatePolicySpec) Validate added in v0.4.0

func (u DeviceUpdatePolicySpec) Validate() []error

type DeviceUpdatedStatus

type DeviceUpdatedStatus struct {
	// Info Human readable information about the last device update transition.
	Info *string `json:"info,omitempty"`

	// Status Status type of the device update.
	Status DeviceUpdatedStatusType `json:"status"`
}

DeviceUpdatedStatus Current status of the device update.

type DeviceUpdatedStatusType

type DeviceUpdatedStatusType string

DeviceUpdatedStatusType Status type of the device update.

const (
	DeviceUpdatedStatusOutOfDate DeviceUpdatedStatusType = "OutOfDate"
	DeviceUpdatedStatusUnknown   DeviceUpdatedStatusType = "Unknown"
	DeviceUpdatedStatusUpToDate  DeviceUpdatedStatusType = "UpToDate"
	DeviceUpdatedStatusUpdating  DeviceUpdatedStatusType = "Updating"
)

Defines values for DeviceUpdatedStatusType.

type DevicesSummary

type DevicesSummary struct {
	// ApplicationStatus A breakdown of the devices in the fleet by "application" status.
	ApplicationStatus map[string]int64 `json:"applicationStatus"`

	// SummaryStatus A breakdown of the devices in the fleet by "summary" status.
	SummaryStatus map[string]int64 `json:"summaryStatus"`

	// Total The total number of devices in the fleet.
	Total int64 `json:"total"`

	// UpdateStatus A breakdown of the devices in the fleet by "updated" status.
	UpdateStatus map[string]int64 `json:"updateStatus"`
}

DevicesSummary A summary of the devices in the fleet returned when fetching a single Fleet.

type DiskResourceMonitorSpec

type DiskResourceMonitorSpec struct {
	// AlertRules Array of alert rules. Only one alert per severity is allowed.
	AlertRules []ResourceAlertRule `json:"alertRules"`

	// MonitorType The type of resource to monitor.
	MonitorType string `json:"monitorType"`

	// Path The directory path to monitor for disk usage.
	Path string `json:"path"`

	// SamplingInterval Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours.
	SamplingInterval string `json:"samplingInterval"`
}

DiskResourceMonitorSpec defines model for DiskResourceMonitorSpec.

type DisruptionBudget added in v0.4.0

type DisruptionBudget struct {
	// GroupBy List of label keys to perform grouping for the disruption budget.
	GroupBy *[]string `json:"groupBy,omitempty"`

	// MaxUnavailable The minimum number of required available devices during rollout.
	MaxUnavailable *int `json:"maxUnavailable,omitempty"`

	// MinAvailable The maximum number of unavailable devices allowed during rollout.
	MinAvailable *int `json:"minAvailable,omitempty"`
}

DisruptionBudget DisruptionBudget defines the level of allowed disruption when rollout is in progress.

func (*DisruptionBudget) Validate added in v0.4.0

func (d *DisruptionBudget) Validate() []error

type Duration added in v0.3.0

type Duration = string

Duration The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours.

type EnrollmentConfig added in v0.2.0

type EnrollmentConfig struct {
	// EnrollmentService EnrollmentService contains information about how to communicate with a Flight Control enrollment service.
	EnrollmentService EnrollmentService `json:"enrollment-service"`
}

EnrollmentConfig defines model for EnrollmentConfig.

type EnrollmentRequest

type EnrollmentRequest struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
	Metadata ObjectMeta `json:"metadata"`

	// Spec EnrollmentRequestSpec is a description of a EnrollmentRequest's target state.
	Spec EnrollmentRequestSpec `json:"spec"`

	// Status EnrollmentRequestStatus represents information about the status of a EnrollmentRequest.
	Status *EnrollmentRequestStatus `json:"status,omitempty"`
}

EnrollmentRequest EnrollmentRequest represents a request for approval to enroll a device.

func (EnrollmentRequest) Validate

func (r EnrollmentRequest) Validate() []error

type EnrollmentRequestApproval

type EnrollmentRequestApproval struct {
	// Approved Indicates whether the request has been approved.
	Approved bool `json:"approved"`

	// Labels A set of labels to apply to the device.
	Labels *map[string]string `json:"labels,omitempty"`
}

EnrollmentRequestApproval EnrollmentRequestApproval contains information about the approval of a device enrollment request.

func (EnrollmentRequestApproval) Validate

func (r EnrollmentRequestApproval) Validate() []error

type EnrollmentRequestApprovalStatus added in v0.4.0

type EnrollmentRequestApprovalStatus struct {
	// Approved Indicates whether the request has been approved.
	Approved bool `json:"approved"`

	// ApprovedAt The time at which the request was approved.
	ApprovedAt time.Time `json:"approvedAt"`

	// ApprovedBy The name of the approver.
	ApprovedBy string `json:"approvedBy"`

	// Labels A set of labels to apply to the device.
	Labels *map[string]string `json:"labels,omitempty"`
}

EnrollmentRequestApprovalStatus defines model for EnrollmentRequestApprovalStatus.

type EnrollmentRequestList

type EnrollmentRequestList struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Items List of EnrollmentRequest.
	Items []EnrollmentRequest `json:"items"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
	Metadata ListMeta `json:"metadata"`
}

EnrollmentRequestList EnrollmentRequestList is a list of EnrollmentRequest.

type EnrollmentRequestSpec

type EnrollmentRequestSpec struct {
	// Csr The PEM-encoded PKCS#10 certificate signing request.
	Csr string `json:"csr"`

	// DeviceStatus DeviceStatus represents information about the status of a device. Status may trail the actual state of a device.
	DeviceStatus *DeviceStatus `json:"deviceStatus,omitempty"`

	// Labels A set of labels that the service will apply to this device when its enrollment is approved.
	Labels *map[string]string `json:"labels,omitempty"`
}

EnrollmentRequestSpec EnrollmentRequestSpec is a description of a EnrollmentRequest's target state.

type EnrollmentRequestStatus

type EnrollmentRequestStatus struct {
	// Approval EnrollmentRequestApprovalStatus represents information about the status of a device enrollment request approval.
	Approval *EnrollmentRequestApprovalStatus `json:"approval,omitempty"`

	// Certificate The PEM-encoded signed certificate.
	Certificate *string `json:"certificate,omitempty"`

	// Conditions Current state of the EnrollmentRequest.
	Conditions []Condition `json:"conditions"`
}

EnrollmentRequestStatus EnrollmentRequestStatus represents information about the status of a EnrollmentRequest.

type EnrollmentService added in v0.2.0

type EnrollmentService struct {
	// Authentication EnrollmentServiceAuth contains the client authentication information for a Flight Control enrollment service.
	Authentication EnrollmentServiceAuth `json:"authentication"`

	// EnrollmentUiEndpoint The URL of the UI that the agent uses to print the QR code and link for enrolling the device.
	EnrollmentUiEndpoint string `json:"enrollment-ui-endpoint"`

	// Service EnrollmentServiceService contains information about connecting to a Flight Control enrollment service.
	Service EnrollmentServiceService `json:"service"`
}

EnrollmentService EnrollmentService contains information about how to communicate with a Flight Control enrollment service.

type EnrollmentServiceAuth added in v0.2.0

type EnrollmentServiceAuth struct {
	// ClientCertificateData ClientCertificateData contains PEM-encoded data from a client cert file for TLS.
	ClientCertificateData string `json:"client-certificate-data"`

	// ClientKeyData ClientKeyData contains PEM-encoded data from a client key file for TLS.
	ClientKeyData string `json:"client-key-data"`
}

EnrollmentServiceAuth EnrollmentServiceAuth contains the client authentication information for a Flight Control enrollment service.

type EnrollmentServiceService added in v0.2.0

type EnrollmentServiceService struct {
	// CertificateAuthorityData CertificateAuthorityData contains PEM-encoded certificate authority certificates.
	CertificateAuthorityData string `json:"certificate-authority-data"`

	// Server Server is the address of the Flight Control enrollment service (https://hostname:port).
	Server string `json:"server"`
}

EnrollmentServiceService EnrollmentServiceService contains information about connecting to a Flight Control enrollment service.

type Error

type Error struct {
	// Message Error message.
	Message string `json:"message"`
}

Error defines model for Error.

type FileOperation

type FileOperation string

FileOperation defines model for FileOperation.

const (
	FileOperationCreated FileOperation = "created"
	FileOperationRemoved FileOperation = "removed"
	FileOperationUpdated FileOperation = "updated"
)

Defines values for FileOperation.

type FileSpec added in v0.3.0

type FileSpec struct {
	// Content The plain text (UTF-8) or base64-encoded content of the file.
	Content string `json:"content"`

	// ContentEncoding How the contents are encoded. Must be either "plain" or "base64". Defaults to "plain".
	ContentEncoding *FileSpecContentEncoding `json:"contentEncoding,omitempty"`

	// Group The file's group, specified either as a name or numeric ID. Defaults to "root".
	Group *string `json:"group,omitempty"`

	// Mode The file's permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644.
	Mode *int `json:"mode,omitempty"`

	// Path The absolute path to the file on the device. Note that any existing file will be overwritten.
	Path string `json:"path"`

	// User The file's owner, specified either as a name or numeric ID. Defaults to "root".
	User *string `json:"user,omitempty"`
}

FileSpec defines model for FileSpec.

type FileSpecContentEncoding added in v0.3.0

type FileSpecContentEncoding string

FileSpecContentEncoding How the contents are encoded. Must be either "plain" or "base64". Defaults to "plain".

const (
	Base64 FileSpecContentEncoding = "base64"
	Plain  FileSpecContentEncoding = "plain"
)

Defines values for FileSpecContentEncoding.

type Fleet

type Fleet struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
	Metadata ObjectMeta `json:"metadata"`

	// Spec FleetSpec is a description of a fleet's target state.
	Spec FleetSpec `json:"spec"`

	// Status FleetStatus represents information about the status of a fleet. Status may trail the actual state of a fleet, especially if devices of a fleet have not contacted the management service in a while.
	Status *FleetStatus `json:"status,omitempty"`
}

Fleet Fleet represents a set of devices.

func (Fleet) Validate

func (r Fleet) Validate() []error

type FleetList

type FleetList struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Items List of Fleets.
	Items []Fleet `json:"items"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
	Metadata ListMeta `json:"metadata"`
}

FleetList FleetList is a list of Fleets.

type FleetRolloutStatus added in v0.3.0

type FleetRolloutStatus struct {
	// CurrentBatch The batch number currently being rolled out.
	CurrentBatch *int `json:"currentBatch,omitempty"`
}

FleetRolloutStatus FleetRolloutStatus represents information about the status of a fleet rollout.

type FleetSpec

type FleetSpec struct {
	// RolloutPolicy RolloutPolicy is the rollout policy of the fleet.
	RolloutPolicy *RolloutPolicy `json:"rolloutPolicy,omitempty"`

	// Selector A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. Empty/null label selectors match nothing.
	Selector *LabelSelector `json:"selector,omitempty"`

	// Template The template for the devices in the fleet.
	Template struct {
		// Metadata ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
		Metadata *ObjectMeta `json:"metadata,omitempty"`

		// Spec DeviceSpec describes a device.
		Spec DeviceSpec `json:"spec"`
	} `json:"template"`
}

FleetSpec FleetSpec is a description of a fleet's target state.

type FleetStatus

type FleetStatus struct {
	// Conditions Current state of the fleet.
	Conditions []Condition `json:"conditions"`

	// DevicesSummary A summary of the devices in the fleet returned when fetching a single Fleet.
	DevicesSummary *DevicesSummary `json:"devicesSummary,omitempty"`

	// Rollout FleetRolloutStatus represents information about the status of a fleet rollout.
	Rollout *FleetRolloutStatus `json:"rollout,omitempty"`
}

FleetStatus FleetStatus represents information about the status of a fleet. Status may trail the actual state of a fleet, especially if devices of a fleet have not contacted the management service in a while.

type GenericRepoSpec

type GenericRepoSpec struct {
	// Type RepoSpecType is the type of the repository.
	Type RepoSpecType `json:"type"`

	// Url The (possibly remote) repository URL.
	Url string `json:"url"`
}

GenericRepoSpec defines model for GenericRepoSpec.

type GetEnrollmentConfigParams added in v0.4.0

type GetEnrollmentConfigParams struct {
	// Csr The name of a CertificateSigningRequest resource to query for an issued certificate. If provided, the service will check if the CertificateSigningRequest contains an issued certificate and in this case include it the returned EnrollmentConfig. In all other case, the enrollment certificate field will be empty.
	Csr *string `form:"csr,omitempty" json:"csr,omitempty"`
}

GetEnrollmentConfigParams defines parameters for GetEnrollmentConfig.

type GetRenderedDeviceSpecParams

type GetRenderedDeviceSpecParams struct {
	// KnownRenderedVersion The last known renderedVersion.
	KnownRenderedVersion *string `form:"knownRenderedVersion,omitempty" json:"knownRenderedVersion,omitempty"`
}

GetRenderedDeviceSpecParams defines parameters for GetRenderedDeviceSpec.

type GitConfigProviderSpec

type GitConfigProviderSpec struct {
	// GitRef The reference to a Git configuration server.
	GitRef struct {
		// MountPath Path in the device's file system at which the repository's path should be mounted.
		MountPath *string `json:"mountPath,omitempty"`

		// Path The path to the config in the Repository.
		Path string `json:"path"`

		// Repository The name of the Repository resource.
		Repository string `json:"repository"`

		// TargetRevision The revision to use from the Repository.
		TargetRevision string `json:"targetRevision"`
	} `json:"gitRef"`

	// Name The name of the config provider.
	Name string `json:"name"`
}

GitConfigProviderSpec defines model for GitConfigProviderSpec.

func (GitConfigProviderSpec) Validate

func (c GitConfigProviderSpec) Validate(fleetTemplate bool) []error

type HookAction

type HookAction struct {
	// If Conditions that must be met for the action to be executed.
	If *[]HookCondition `json:"if,omitempty"`

	// Timeout The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are 's' for seconds, 'm' for minutes, and 'h' for hours.
	Timeout *string `json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

HookAction defines model for HookAction.

func (HookAction) AsHookActionRun added in v0.4.0

func (t HookAction) AsHookActionRun() (HookActionRun, error)

AsHookActionRun returns the union data inside the HookAction as a HookActionRun

func (*HookAction) FromHookActionRun added in v0.4.0

func (t *HookAction) FromHookActionRun(v HookActionRun) error

FromHookActionRun overwrites any union data inside the HookAction as the provided HookActionRun

func (HookAction) MarshalJSON

func (t HookAction) MarshalJSON() ([]byte, error)

func (*HookAction) MergeHookActionRun added in v0.4.0

func (t *HookAction) MergeHookActionRun(v HookActionRun) error

MergeHookActionRun performs a merge with any union data inside the HookAction, using the provided HookActionRun

func (HookAction) Type

func (t HookAction) Type() (HookActionType, error)

Type returns the type of the action.

func (*HookAction) UnmarshalJSON

func (t *HookAction) UnmarshalJSON(b []byte) error

func (HookAction) Validate added in v0.4.0

func (a HookAction) Validate(path string) []error

type HookActionRun added in v0.4.0

type HookActionRun struct {
	// EnvVars Environment variable key-value pairs, injected during runtime.
	EnvVars *map[string]string `json:"envVars,omitempty"`

	// Run The command to be executed, including any arguments using standard shell syntax. This field supports multiple commands piped together, as if they were executed under a bash -c context.
	Run string `json:"run"`

	// WorkDir The working directory to be used when running the command.
	WorkDir *string `json:"workDir,omitempty"`
}

HookActionRun defines model for HookActionRun.

type HookActionType added in v0.3.0

type HookActionType string
const (
	HookActionTypeRun HookActionType = "run"
)

type HookCondition added in v0.4.0

type HookCondition struct {
	// contains filtered or unexported fields
}

HookCondition defines model for HookCondition.

func (HookCondition) AsHookConditionExpression added in v0.4.0

func (t HookCondition) AsHookConditionExpression() (HookConditionExpression, error)

AsHookConditionExpression returns the union data inside the HookCondition as a HookConditionExpression

func (HookCondition) AsHookConditionPathOp added in v0.4.0

func (t HookCondition) AsHookConditionPathOp() (HookConditionPathOp, error)

AsHookConditionPathOp returns the union data inside the HookCondition as a HookConditionPathOp

func (*HookCondition) FromHookConditionExpression added in v0.4.0

func (t *HookCondition) FromHookConditionExpression(v HookConditionExpression) error

FromHookConditionExpression overwrites any union data inside the HookCondition as the provided HookConditionExpression

func (*HookCondition) FromHookConditionPathOp added in v0.4.0

func (t *HookCondition) FromHookConditionPathOp(v HookConditionPathOp) error

FromHookConditionPathOp overwrites any union data inside the HookCondition as the provided HookConditionPathOp

func (HookCondition) MarshalJSON added in v0.4.0

func (t HookCondition) MarshalJSON() ([]byte, error)

func (*HookCondition) MergeHookConditionExpression added in v0.4.0

func (t *HookCondition) MergeHookConditionExpression(v HookConditionExpression) error

MergeHookConditionExpression performs a merge with any union data inside the HookCondition, using the provided HookConditionExpression

func (*HookCondition) MergeHookConditionPathOp added in v0.4.0

func (t *HookCondition) MergeHookConditionPathOp(v HookConditionPathOp) error

MergeHookConditionPathOp performs a merge with any union data inside the HookCondition, using the provided HookConditionPathOp

func (HookCondition) Type added in v0.4.0

Type returns the type of the condition.

func (*HookCondition) UnmarshalJSON added in v0.4.0

func (t *HookCondition) UnmarshalJSON(b []byte) error

func (HookCondition) Validate added in v0.4.0

func (c HookCondition) Validate(path string) []error

type HookConditionExpression added in v0.4.0

type HookConditionExpression = string

HookConditionExpression An expression that must evaluate to true as condition for the action to be performed.

type HookConditionPathOp added in v0.4.0

type HookConditionPathOp struct {
	// Op The operation(s) on files at or below the path that satisfy the path condition.
	Op []FileOperation `json:"op"`

	// Path The absolute path to a file or directory that must have changed as condition for the action to be performed.
	Path string `json:"path"`
}

HookConditionPathOp defines model for HookConditionPathOp.

type HookConditionType added in v0.4.0

type HookConditionType string
const (
	HookConditionTypePathOp     HookConditionType = "path"
	HookConditionTypeExpression HookConditionType = "expression"
)

type HttpConfig

type HttpConfig struct {
	// CaCrt Base64 encoded root CA.
	CaCrt *string `json:"ca.crt,omitempty"`

	// Password The password for auth with HTTP transport.
	Password *string `json:"password,omitempty"`

	// SkipServerVerification Skip remote server verification.
	SkipServerVerification *bool `json:"skipServerVerification,omitempty"`

	// TlsCrt Base64 encoded TLS cert data.
	TlsCrt *string `json:"tls.crt,omitempty"`

	// TlsKey Base64 encoded TLS cert key.
	TlsKey *string `json:"tls.key,omitempty"`

	// Token The token for auth with HTTP transport.
	Token *string `json:"token,omitempty"`

	// Username The username for auth with HTTP transport.
	Username *string `json:"username,omitempty"`
}

HttpConfig Configuration for HTTP transport.

type HttpConfigProviderSpec

type HttpConfigProviderSpec struct {
	// HttpRef The reference to an HTTP configuration server.
	HttpRef struct {
		// FilePath Path in the device's file system to which the content returned by the HTTP sever should be written.
		FilePath string `json:"filePath"`

		// Repository The name of the repository resource to use as the sync source.
		Repository string `json:"repository"`

		// Suffix Part of the URL that comes after the base URL. It can include query parameters such as: "/path/to/endpoint?query=param".
		Suffix *string `json:"suffix,omitempty"`
	} `json:"httpRef"`

	// Name The name of the config provider.
	Name string `json:"name"`
}

HttpConfigProviderSpec defines model for HttpConfigProviderSpec.

func (HttpConfigProviderSpec) Validate

func (h HttpConfigProviderSpec) Validate(fleetTemplate bool) []error

type HttpRepoSpec

type HttpRepoSpec struct {
	// HttpConfig Configuration for HTTP transport.
	HttpConfig HttpConfig `json:"httpConfig"`

	// Type RepoSpecType is the type of the repository.
	Type RepoSpecType `json:"type"`

	// Url The HTTP URL to call or clone from.
	Url string `json:"url"`

	// ValidationSuffix URL suffix used only for validating access to the repository. Users might use the URL field as a root URL to be used by config sources adding suffixes. This will help with the validation of the http endpoint.
	ValidationSuffix *string `json:"validationSuffix,omitempty"`
}

HttpRepoSpec defines model for HttpRepoSpec.

type ImageApplicationProvider added in v0.3.0

type ImageApplicationProvider struct {
	// Image Reference to the container image for the application package.
	Image string `json:"image"`
}

ImageApplicationProvider defines model for ImageApplicationProvider.

type InlineConfigProviderSpec

type InlineConfigProviderSpec struct {
	// Inline A list of files to create on the device.
	Inline []FileSpec `json:"inline"`

	// Name The name of the config provider.
	Name string `json:"name"`
}

InlineConfigProviderSpec defines model for InlineConfigProviderSpec.

func (InlineConfigProviderSpec) Validate

func (c InlineConfigProviderSpec) Validate(fleetTemplate bool) []error

type KubernetesSecretProviderSpec

type KubernetesSecretProviderSpec struct {
	// Name The name of the config provider.
	Name string `json:"name"`

	// SecretRef The reference to a Kubernetes secret.
	SecretRef struct {
		// MountPath Path in the device's file system at which the secret should be mounted.
		MountPath string `json:"mountPath"`

		// Name The name of the secret.
		Name string `json:"name"`

		// Namespace The namespace of the secret.
		Namespace string `json:"namespace"`
	} `json:"secretRef"`
}

KubernetesSecretProviderSpec defines model for KubernetesSecretProviderSpec.

func (KubernetesSecretProviderSpec) Validate

func (c KubernetesSecretProviderSpec) Validate(fleetTemplate bool) []error

type LabelSelector

type LabelSelector struct {
	// MatchExpressions A list of match expressions.
	MatchExpressions *MatchExpressions `json:"matchExpressions,omitempty"`

	// MatchLabels A map of {key,value} pairs.
	MatchLabels *map[string]string `json:"matchLabels,omitempty"`
}

LabelSelector A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. Empty/null label selectors match nothing.

func (*LabelSelector) Validate added in v0.3.0

func (l *LabelSelector) Validate() []error

type ListCertificateSigningRequestsParams

type ListCertificateSigningRequestsParams struct {
	// Continue An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.
	Continue *string `form:"continue,omitempty" json:"continue,omitempty"`

	// LabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
	LabelSelector *string `form:"labelSelector,omitempty" json:"labelSelector,omitempty"`

	// FieldSelector A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2").
	FieldSelector *string `form:"fieldSelector,omitempty" json:"fieldSelector,omitempty"`

	// Limit The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.
	Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`
}

ListCertificateSigningRequestsParams defines parameters for ListCertificateSigningRequests.

type ListDevicesParams

type ListDevicesParams struct {
	// Continue An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.
	Continue *string `form:"continue,omitempty" json:"continue,omitempty"`

	// LabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
	LabelSelector *string `form:"labelSelector,omitempty" json:"labelSelector,omitempty"`

	// FieldSelector A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2").
	FieldSelector *string `form:"fieldSelector,omitempty" json:"fieldSelector,omitempty"`

	// Limit The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.
	Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`

	// SummaryOnly A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.
	SummaryOnly *bool `form:"summaryOnly,omitempty" json:"summaryOnly,omitempty"`
}

ListDevicesParams defines parameters for ListDevices.

type ListEnrollmentRequestsParams

type ListEnrollmentRequestsParams struct {
	// Continue An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.
	Continue *string `form:"continue,omitempty" json:"continue,omitempty"`

	// LabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
	LabelSelector *string `form:"labelSelector,omitempty" json:"labelSelector,omitempty"`

	// FieldSelector A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2").
	FieldSelector *string `form:"fieldSelector,omitempty" json:"fieldSelector,omitempty"`

	// Limit The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.
	Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`
}

ListEnrollmentRequestsParams defines parameters for ListEnrollmentRequests.

type ListFleetsParams

type ListFleetsParams struct {
	// Continue An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.
	Continue *string `form:"continue,omitempty" json:"continue,omitempty"`

	// LabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
	LabelSelector *string `form:"labelSelector,omitempty" json:"labelSelector,omitempty"`

	// FieldSelector A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2").
	FieldSelector *string `form:"fieldSelector,omitempty" json:"fieldSelector,omitempty"`

	// Limit The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.
	Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`

	// AddDevicesSummary Include a summary of the devices in the fleet.
	AddDevicesSummary *bool `form:"addDevicesSummary,omitempty" json:"addDevicesSummary,omitempty"`
}

ListFleetsParams defines parameters for ListFleets.

type ListMeta

type ListMeta struct {
	// Continue May be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.
	Continue *string `json:"continue,omitempty"`

	// RemainingItemCount The number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.
	RemainingItemCount *int64 `json:"remainingItemCount,omitempty"`
}

ListMeta ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.

type ListRepositoriesParams

type ListRepositoriesParams struct {
	// Continue An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.
	Continue *string `form:"continue,omitempty" json:"continue,omitempty"`

	// LabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
	LabelSelector *string `form:"labelSelector,omitempty" json:"labelSelector,omitempty"`

	// FieldSelector A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2").
	FieldSelector *string `form:"fieldSelector,omitempty" json:"fieldSelector,omitempty"`

	// Limit The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.
	Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`
}

ListRepositoriesParams defines parameters for ListRepositories.

type ListResourceSyncParams

type ListResourceSyncParams struct {
	// Continue An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.
	Continue *string `form:"continue,omitempty" json:"continue,omitempty"`

	// LabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
	LabelSelector *string `form:"labelSelector,omitempty" json:"labelSelector,omitempty"`

	// FieldSelector A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2").
	FieldSelector *string `form:"fieldSelector,omitempty" json:"fieldSelector,omitempty"`

	// Limit The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.
	Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`
}

ListResourceSyncParams defines parameters for ListResourceSync.

type ListTemplateVersionsParams

type ListTemplateVersionsParams struct {
	// Continue An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.
	Continue *string `form:"continue,omitempty" json:"continue,omitempty"`

	// LabelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
	LabelSelector *string `form:"labelSelector,omitempty" json:"labelSelector,omitempty"`

	// FieldSelector A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2").
	FieldSelector *string `form:"fieldSelector,omitempty" json:"fieldSelector,omitempty"`

	// Limit The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.
	Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`
}

ListTemplateVersionsParams defines parameters for ListTemplateVersions.

type MatchExpression added in v0.3.0

type MatchExpression struct {
	// Key The label key that the selector applies to.
	Key string `json:"key"`

	// Operator The operation to apply when matching.
	Operator MatchExpressionOperator `json:"operator"`

	// Values The list of values to match.
	Values *[]string `json:"values,omitempty"`
}

MatchExpression defines model for MatchExpression.

func (MatchExpression) String added in v0.4.0

func (e MatchExpression) String() string

String converts a MatchExpression into its string representation. Example formats: - Exists: "key" - DoesNotExist: "!key" - In: "key in (val1, val2)" - NotIn: "key notin (val1, val2)"

type MatchExpressionOperator added in v0.3.0

type MatchExpressionOperator string

MatchExpressionOperator The operation to apply when matching.

const (
	DoesNotExist MatchExpressionOperator = "DoesNotExist"
	Exists       MatchExpressionOperator = "Exists"
	In           MatchExpressionOperator = "In"
	NotIn        MatchExpressionOperator = "NotIn"
)

Defines values for MatchExpressionOperator.

type MatchExpressions added in v0.3.0

type MatchExpressions = []MatchExpression

MatchExpressions A list of match expressions.

type MemoryResourceMonitorSpec

type MemoryResourceMonitorSpec = ResourceMonitorSpec

MemoryResourceMonitorSpec Specification for monitoring a resource.

type ObjectMeta

type ObjectMeta struct {
	// Annotations Properties set by the service.
	Annotations *map[string]string `json:"annotations,omitempty"`

	// CreationTimestamp The time the object was created.
	CreationTimestamp *time.Time `json:"creationTimestamp,omitempty"`

	// DeletionTimestamp The time the object will be deleted.
	DeletionTimestamp *time.Time `json:"deletionTimestamp,omitempty"`

	// Generation A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.
	Generation *int64 `json:"generation,omitempty"`

	// Labels Map of string keys and values that can be used to organize and categorize (scope and select) objects.
	Labels *map[string]string `json:"labels,omitempty"`

	// Name The name of the object.
	Name *string `json:"name,omitempty"`

	// Owner A resource that owns this resource, in "kind/name" format.
	Owner *string `json:"owner,omitempty"`

	// ResourceVersion An opaque string that identifies the server's internal version of an object.
	ResourceVersion *string `json:"resourceVersion,omitempty"`
}

ObjectMeta ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

type PatchCertificateSigningRequestApplicationJSONPatchPlusJSONRequestBody

type PatchCertificateSigningRequestApplicationJSONPatchPlusJSONRequestBody = PatchRequest

PatchCertificateSigningRequestApplicationJSONPatchPlusJSONRequestBody defines body for PatchCertificateSigningRequest for application/json-patch+json ContentType.

type PatchDeviceApplicationJSONPatchPlusJSONRequestBody

type PatchDeviceApplicationJSONPatchPlusJSONRequestBody = PatchRequest

PatchDeviceApplicationJSONPatchPlusJSONRequestBody defines body for PatchDevice for application/json-patch+json ContentType.

type PatchDeviceStatusApplicationJSONPatchPlusJSONRequestBody added in v0.4.0

type PatchDeviceStatusApplicationJSONPatchPlusJSONRequestBody = PatchRequest

PatchDeviceStatusApplicationJSONPatchPlusJSONRequestBody defines body for PatchDeviceStatus for application/json-patch+json ContentType.

type PatchEnrollmentRequestApplicationJSONPatchPlusJSONRequestBody added in v0.4.0

type PatchEnrollmentRequestApplicationJSONPatchPlusJSONRequestBody = PatchRequest

PatchEnrollmentRequestApplicationJSONPatchPlusJSONRequestBody defines body for PatchEnrollmentRequest for application/json-patch+json ContentType.

type PatchEnrollmentRequestStatusApplicationJSONPatchPlusJSONRequestBody added in v0.4.0

type PatchEnrollmentRequestStatusApplicationJSONPatchPlusJSONRequestBody = PatchRequest

PatchEnrollmentRequestStatusApplicationJSONPatchPlusJSONRequestBody defines body for PatchEnrollmentRequestStatus for application/json-patch+json ContentType.

type PatchFleetApplicationJSONPatchPlusJSONRequestBody

type PatchFleetApplicationJSONPatchPlusJSONRequestBody = PatchRequest

PatchFleetApplicationJSONPatchPlusJSONRequestBody defines body for PatchFleet for application/json-patch+json ContentType.

type PatchFleetStatusApplicationJSONPatchPlusJSONRequestBody added in v0.4.0

type PatchFleetStatusApplicationJSONPatchPlusJSONRequestBody = PatchRequest

PatchFleetStatusApplicationJSONPatchPlusJSONRequestBody defines body for PatchFleetStatus for application/json-patch+json ContentType.

type PatchRepositoryApplicationJSONPatchPlusJSONRequestBody

type PatchRepositoryApplicationJSONPatchPlusJSONRequestBody = PatchRequest

PatchRepositoryApplicationJSONPatchPlusJSONRequestBody defines body for PatchRepository for application/json-patch+json ContentType.

type PatchRequest

type PatchRequest = []struct {
	// Op The operation to perform.
	Op PatchRequestOp `json:"op"`

	// Path A JSON Pointer path.
	Path string `json:"path"`

	// Value The value to add or replace.
	Value *interface{} `json:"value,omitempty"`
}

PatchRequest defines model for PatchRequest.

type PatchRequestOp

type PatchRequestOp string

PatchRequestOp The operation to perform.

const (
	Add     PatchRequestOp = "add"
	Remove  PatchRequestOp = "remove"
	Replace PatchRequestOp = "replace"
)

Defines values for PatchRequestOp.

type PatchResourceSyncApplicationJSONPatchPlusJSONRequestBody

type PatchResourceSyncApplicationJSONPatchPlusJSONRequestBody = PatchRequest

PatchResourceSyncApplicationJSONPatchPlusJSONRequestBody defines body for PatchResourceSync for application/json-patch+json ContentType.

type Percentage added in v0.3.0

type Percentage = string

Percentage Percentage is the string format representing percentage string.

type ReadFleetParams

type ReadFleetParams struct {
	// AddDevicesSummary Include a summary of the devices in the fleet.
	AddDevicesSummary *bool `form:"addDevicesSummary,omitempty" json:"addDevicesSummary,omitempty"`
}

ReadFleetParams defines parameters for ReadFleet.

type RenderedApplicationSpec added in v0.3.0

type RenderedApplicationSpec struct {
	// EnvVars Environment variable key-value pairs, injected during runtime. The key and value each must be between 1 and 253 characters.
	EnvVars *map[string]string `json:"envVars,omitempty"`

	// Name An application name.
	Name *string `json:"name,omitempty"`
	// contains filtered or unexported fields
}

RenderedApplicationSpec defines model for RenderedApplicationSpec.

func (RenderedApplicationSpec) AsImageApplicationProvider added in v0.3.0

func (t RenderedApplicationSpec) AsImageApplicationProvider() (ImageApplicationProvider, error)

AsImageApplicationProvider returns the union data inside the RenderedApplicationSpec as a ImageApplicationProvider

func (*RenderedApplicationSpec) FromImageApplicationProvider added in v0.3.0

func (t *RenderedApplicationSpec) FromImageApplicationProvider(v ImageApplicationProvider) error

FromImageApplicationProvider overwrites any union data inside the RenderedApplicationSpec as the provided ImageApplicationProvider

func (RenderedApplicationSpec) MarshalJSON added in v0.3.0

func (t RenderedApplicationSpec) MarshalJSON() ([]byte, error)

func (*RenderedApplicationSpec) MergeImageApplicationProvider added in v0.3.0

func (t *RenderedApplicationSpec) MergeImageApplicationProvider(v ImageApplicationProvider) error

MergeImageApplicationProvider performs a merge with any union data inside the RenderedApplicationSpec, using the provided ImageApplicationProvider

func (RenderedApplicationSpec) Type added in v0.3.0

Type returns the type of the application provider.

func (*RenderedApplicationSpec) UnmarshalJSON added in v0.3.0

func (t *RenderedApplicationSpec) UnmarshalJSON(b []byte) error

type RenderedDeviceSpec

type RenderedDeviceSpec struct {
	// Applications The list of applications to deploy.
	Applications *[]RenderedApplicationSpec `json:"applications,omitempty"`

	// Config The configuration to apply, in Ignition format.
	Config *string `json:"config,omitempty"`

	// Console DeviceConsole represents the console connection information.
	Console *DeviceConsole `json:"console,omitempty"`

	// Decommission Metadata about a device decommissioning request.
	Decommission *DeviceDecommission `json:"decommission,omitempty"`

	// Os DeviceOsSpec describes the target OS for the device.
	Os *DeviceOsSpec `json:"os,omitempty"`

	// RenderedVersion Version of the rendered device spec.
	RenderedVersion string `json:"renderedVersion"`

	// Resources Array of resource monitor configurations.
	Resources *[]ResourceMonitor `json:"resources,omitempty"`

	// Systemd The systemd services to monitor.
	Systemd *struct {
		// MatchPatterns A list of match patterns.
		MatchPatterns *[]string `json:"matchPatterns,omitempty"`
	} `json:"systemd,omitempty"`

	// UpdatePolicy Specifies the policy for managing device updates, including when updates should be downloaded and applied.
	UpdatePolicy *DeviceUpdatePolicySpec `json:"updatePolicy,omitempty"`
}

RenderedDeviceSpec RenderedDeviceSpec describes the rendered and self-contained specification of a Device.

type ReplaceCertificateSigningRequestJSONRequestBody

type ReplaceCertificateSigningRequestJSONRequestBody = CertificateSigningRequest

ReplaceCertificateSigningRequestJSONRequestBody defines body for ReplaceCertificateSigningRequest for application/json ContentType.

type ReplaceDeviceJSONRequestBody

type ReplaceDeviceJSONRequestBody = Device

ReplaceDeviceJSONRequestBody defines body for ReplaceDevice for application/json ContentType.

type ReplaceDeviceStatusJSONRequestBody

type ReplaceDeviceStatusJSONRequestBody = Device

ReplaceDeviceStatusJSONRequestBody defines body for ReplaceDeviceStatus for application/json ContentType.

type ReplaceEnrollmentRequestJSONRequestBody

type ReplaceEnrollmentRequestJSONRequestBody = EnrollmentRequest

ReplaceEnrollmentRequestJSONRequestBody defines body for ReplaceEnrollmentRequest for application/json ContentType.

type ReplaceEnrollmentRequestStatusJSONRequestBody

type ReplaceEnrollmentRequestStatusJSONRequestBody = EnrollmentRequest

ReplaceEnrollmentRequestStatusJSONRequestBody defines body for ReplaceEnrollmentRequestStatus for application/json ContentType.

type ReplaceFleetJSONRequestBody

type ReplaceFleetJSONRequestBody = Fleet

ReplaceFleetJSONRequestBody defines body for ReplaceFleet for application/json ContentType.

type ReplaceFleetStatusJSONRequestBody

type ReplaceFleetStatusJSONRequestBody = Fleet

ReplaceFleetStatusJSONRequestBody defines body for ReplaceFleetStatus for application/json ContentType.

type ReplaceRepositoryJSONRequestBody

type ReplaceRepositoryJSONRequestBody = Repository

ReplaceRepositoryJSONRequestBody defines body for ReplaceRepository for application/json ContentType.

type ReplaceResourceSyncJSONRequestBody

type ReplaceResourceSyncJSONRequestBody = ResourceSync

ReplaceResourceSyncJSONRequestBody defines body for ReplaceResourceSync for application/json ContentType.

type RepoSpecType

type RepoSpecType string

RepoSpecType RepoSpecType is the type of the repository.

const (
	Git  RepoSpecType = "git"
	Http RepoSpecType = "http"
)

Defines values for RepoSpecType.

type Repository

type Repository struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
	Metadata ObjectMeta `json:"metadata"`

	// Spec RepositorySpec describes a configuration repository.
	Spec RepositorySpec `json:"spec"`

	// Status RepositoryStatus represents information about the status of a repository.
	Status *RepositoryStatus `json:"status,omitempty"`
}

Repository Repository represents a Git repository or an HTTP endpoint.

func (Repository) Validate

func (r Repository) Validate() []error

type RepositoryList

type RepositoryList struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Items List of repositories.
	Items []Repository `json:"items"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
	Metadata ListMeta `json:"metadata"`
}

RepositoryList RepositoryList is a list of Repositories.

type RepositorySpec

type RepositorySpec struct {
	// contains filtered or unexported fields
}

RepositorySpec RepositorySpec describes a configuration repository.

func (RepositorySpec) AsGenericRepoSpec

func (t RepositorySpec) AsGenericRepoSpec() (GenericRepoSpec, error)

AsGenericRepoSpec returns the union data inside the RepositorySpec as a GenericRepoSpec

func (RepositorySpec) AsHttpRepoSpec

func (t RepositorySpec) AsHttpRepoSpec() (HttpRepoSpec, error)

AsHttpRepoSpec returns the union data inside the RepositorySpec as a HttpRepoSpec

func (RepositorySpec) AsSshRepoSpec

func (t RepositorySpec) AsSshRepoSpec() (SshRepoSpec, error)

AsSshRepoSpec returns the union data inside the RepositorySpec as a SshRepoSpec

func (*RepositorySpec) FromGenericRepoSpec

func (t *RepositorySpec) FromGenericRepoSpec(v GenericRepoSpec) error

FromGenericRepoSpec overwrites any union data inside the RepositorySpec as the provided GenericRepoSpec

func (*RepositorySpec) FromHttpRepoSpec

func (t *RepositorySpec) FromHttpRepoSpec(v HttpRepoSpec) error

FromHttpRepoSpec overwrites any union data inside the RepositorySpec as the provided HttpRepoSpec

func (*RepositorySpec) FromSshRepoSpec

func (t *RepositorySpec) FromSshRepoSpec(v SshRepoSpec) error

FromSshRepoSpec overwrites any union data inside the RepositorySpec as the provided SshRepoSpec

func (RepositorySpec) GetGenericRepoSpec

func (t RepositorySpec) GetGenericRepoSpec() (GenericRepoSpec, error)

func (RepositorySpec) GetHttpRepoSpec

func (t RepositorySpec) GetHttpRepoSpec() (HttpRepoSpec, error)

func (RepositorySpec) GetRepoURL

func (t RepositorySpec) GetRepoURL() (string, error)

loose decoder is fine here as all repo specs have `repo` field

func (RepositorySpec) GetSshRepoSpec

func (t RepositorySpec) GetSshRepoSpec() (SshRepoSpec, error)

func (RepositorySpec) MarshalJSON

func (t RepositorySpec) MarshalJSON() ([]byte, error)

func (*RepositorySpec) MergeGenericRepoSpec

func (t *RepositorySpec) MergeGenericRepoSpec(v GenericRepoSpec) error

MergeGenericRepoSpec performs a merge with any union data inside the RepositorySpec, using the provided GenericRepoSpec

func (*RepositorySpec) MergeHttpRepoSpec

func (t *RepositorySpec) MergeHttpRepoSpec(v HttpRepoSpec) error

MergeHttpRepoSpec performs a merge with any union data inside the RepositorySpec, using the provided HttpRepoSpec

func (*RepositorySpec) MergeSshRepoSpec

func (t *RepositorySpec) MergeSshRepoSpec(v SshRepoSpec) error

MergeSshRepoSpec performs a merge with any union data inside the RepositorySpec, using the provided SshRepoSpec

func (*RepositorySpec) UnmarshalJSON

func (t *RepositorySpec) UnmarshalJSON(b []byte) error

type RepositoryStatus

type RepositoryStatus struct {
	// Conditions Current state of the repository.
	Conditions []Condition `json:"conditions"`
}

RepositoryStatus RepositoryStatus represents information about the status of a repository.

type ResourceAlertRule

type ResourceAlertRule struct {
	// Description A human-readable description of the alert.
	Description string `json:"description"`

	// Duration Duration is the time over which the average usage is observed before alerting. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours.
	Duration string `json:"duration"`

	// Percentage The percentage of usage that triggers the alert.
	Percentage float32 `json:"percentage"`

	// Severity Severity of the alert.
	Severity ResourceAlertSeverityType `json:"severity"`
}

ResourceAlertRule defines model for ResourceAlertRule.

func (ResourceAlertRule) Validate added in v0.3.0

func (r ResourceAlertRule) Validate(specSampleInterval string) []error

type ResourceAlertSeverityType

type ResourceAlertSeverityType string

ResourceAlertSeverityType Severity of the alert.

const (
	ResourceAlertSeverityTypeCritical ResourceAlertSeverityType = "Critical"
	ResourceAlertSeverityTypeInfo     ResourceAlertSeverityType = "Info"
	ResourceAlertSeverityTypeWarning  ResourceAlertSeverityType = "Warning"
)

Defines values for ResourceAlertSeverityType.

type ResourceMonitor

type ResourceMonitor struct {
	// contains filtered or unexported fields
}

ResourceMonitor defines model for ResourceMonitor.

func (ResourceMonitor) AsCpuResourceMonitorSpec added in v0.4.0

func (t ResourceMonitor) AsCpuResourceMonitorSpec() (CpuResourceMonitorSpec, error)

AsCpuResourceMonitorSpec returns the union data inside the ResourceMonitor as a CpuResourceMonitorSpec

func (ResourceMonitor) AsDiskResourceMonitorSpec

func (t ResourceMonitor) AsDiskResourceMonitorSpec() (DiskResourceMonitorSpec, error)

AsDiskResourceMonitorSpec returns the union data inside the ResourceMonitor as a DiskResourceMonitorSpec

func (ResourceMonitor) AsMemoryResourceMonitorSpec

func (t ResourceMonitor) AsMemoryResourceMonitorSpec() (MemoryResourceMonitorSpec, error)

AsMemoryResourceMonitorSpec returns the union data inside the ResourceMonitor as a MemoryResourceMonitorSpec

func (ResourceMonitor) Discriminator

func (t ResourceMonitor) Discriminator() (string, error)

func (*ResourceMonitor) FromCpuResourceMonitorSpec added in v0.4.0

func (t *ResourceMonitor) FromCpuResourceMonitorSpec(v CpuResourceMonitorSpec) error

FromCpuResourceMonitorSpec overwrites any union data inside the ResourceMonitor as the provided CpuResourceMonitorSpec

func (*ResourceMonitor) FromDiskResourceMonitorSpec

func (t *ResourceMonitor) FromDiskResourceMonitorSpec(v DiskResourceMonitorSpec) error

FromDiskResourceMonitorSpec overwrites any union data inside the ResourceMonitor as the provided DiskResourceMonitorSpec

func (*ResourceMonitor) FromMemoryResourceMonitorSpec

func (t *ResourceMonitor) FromMemoryResourceMonitorSpec(v MemoryResourceMonitorSpec) error

FromMemoryResourceMonitorSpec overwrites any union data inside the ResourceMonitor as the provided MemoryResourceMonitorSpec

func (ResourceMonitor) MarshalJSON

func (t ResourceMonitor) MarshalJSON() ([]byte, error)

func (*ResourceMonitor) MergeCpuResourceMonitorSpec added in v0.4.0

func (t *ResourceMonitor) MergeCpuResourceMonitorSpec(v CpuResourceMonitorSpec) error

MergeCpuResourceMonitorSpec performs a merge with any union data inside the ResourceMonitor, using the provided CpuResourceMonitorSpec

func (*ResourceMonitor) MergeDiskResourceMonitorSpec

func (t *ResourceMonitor) MergeDiskResourceMonitorSpec(v DiskResourceMonitorSpec) error

MergeDiskResourceMonitorSpec performs a merge with any union data inside the ResourceMonitor, using the provided DiskResourceMonitorSpec

func (*ResourceMonitor) MergeMemoryResourceMonitorSpec

func (t *ResourceMonitor) MergeMemoryResourceMonitorSpec(v MemoryResourceMonitorSpec) error

MergeMemoryResourceMonitorSpec performs a merge with any union data inside the ResourceMonitor, using the provided MemoryResourceMonitorSpec

func (*ResourceMonitor) UnmarshalJSON

func (t *ResourceMonitor) UnmarshalJSON(b []byte) error

func (ResourceMonitor) Validate added in v0.3.0

func (r ResourceMonitor) Validate() []error

func (ResourceMonitor) ValueByDiscriminator

func (t ResourceMonitor) ValueByDiscriminator() (interface{}, error)

type ResourceMonitorSpec

type ResourceMonitorSpec struct {
	// AlertRules Array of alert rules. Only one alert per severity is allowed.
	AlertRules []ResourceAlertRule `json:"alertRules"`

	// MonitorType The type of resource to monitor.
	MonitorType string `json:"monitorType"`

	// SamplingInterval Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours.
	SamplingInterval string `json:"samplingInterval"`
}

ResourceMonitorSpec Specification for monitoring a resource.

type ResourceSync

type ResourceSync struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
	Metadata ObjectMeta `json:"metadata"`

	// Spec ResourceSyncSpec describes the file(s) to sync from a repository.
	Spec ResourceSyncSpec `json:"spec"`

	// Status ResourceSyncStatus represents information about the status of a ResourceSync.
	Status *ResourceSyncStatus `json:"status,omitempty"`
}

ResourceSync ResourceSync represents a reference to one or more files in a repository to sync to resource definitions.

func (ResourceSync) Validate

func (r ResourceSync) Validate() []error

type ResourceSyncList

type ResourceSyncList struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Items List of resourcesync.
	Items []ResourceSync `json:"items"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
	Metadata ListMeta `json:"metadata"`
}

ResourceSyncList defines model for ResourceSyncList.

type ResourceSyncSpec

type ResourceSyncSpec struct {
	// Path The path of a file or directory in the repository. If a directory, the directory should contain only resource definitions with no subdirectories. Each file should contain the definition of one or more resources.
	Path string `json:"path"`

	// Repository The name of the repository resource to use as the sync source.
	Repository string `json:"repository"`

	// TargetRevision The desired revision in the repository.
	TargetRevision string `json:"targetRevision"`
}

ResourceSyncSpec ResourceSyncSpec describes the file(s) to sync from a repository.

type ResourceSyncStatus

type ResourceSyncStatus struct {
	// Conditions Current state of a resourcesync.
	Conditions []Condition `json:"conditions"`

	// ObservedCommit The last commit hash that was synced.
	ObservedCommit *string `json:"observedCommit,omitempty"`

	// ObservedGeneration The last generation that was synced.
	ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
}

ResourceSyncStatus ResourceSyncStatus represents information about the status of a ResourceSync.

type RolloutDeviceSelection added in v0.3.0

type RolloutDeviceSelection struct {
	// contains filtered or unexported fields
}

RolloutDeviceSelection Describes how to select devices for rollout.

func (RolloutDeviceSelection) AsBatchSequence added in v0.3.0

func (t RolloutDeviceSelection) AsBatchSequence() (BatchSequence, error)

AsBatchSequence returns the union data inside the RolloutDeviceSelection as a BatchSequence

func (RolloutDeviceSelection) Discriminator added in v0.3.0

func (t RolloutDeviceSelection) Discriminator() (string, error)

func (*RolloutDeviceSelection) FromBatchSequence added in v0.3.0

func (t *RolloutDeviceSelection) FromBatchSequence(v BatchSequence) error

FromBatchSequence overwrites any union data inside the RolloutDeviceSelection as the provided BatchSequence

func (RolloutDeviceSelection) MarshalJSON added in v0.3.0

func (t RolloutDeviceSelection) MarshalJSON() ([]byte, error)

func (*RolloutDeviceSelection) MergeBatchSequence added in v0.3.0

func (t *RolloutDeviceSelection) MergeBatchSequence(v BatchSequence) error

MergeBatchSequence performs a merge with any union data inside the RolloutDeviceSelection, using the provided BatchSequence

func (*RolloutDeviceSelection) UnmarshalJSON added in v0.3.0

func (t *RolloutDeviceSelection) UnmarshalJSON(b []byte) error

func (*RolloutDeviceSelection) Validate added in v0.4.0

func (r *RolloutDeviceSelection) Validate() []error

func (RolloutDeviceSelection) ValueByDiscriminator added in v0.3.0

func (t RolloutDeviceSelection) ValueByDiscriminator() (interface{}, error)

type RolloutPolicy added in v0.3.0

type RolloutPolicy struct {
	// DefaultUpdateTimeout The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours.
	DefaultUpdateTimeout *Duration `json:"defaultUpdateTimeout,omitempty"`

	// DeviceSelection Describes how to select devices for rollout.
	DeviceSelection *RolloutDeviceSelection `json:"deviceSelection,omitempty"`

	// DisruptionBudget DisruptionBudget defines the level of allowed disruption when rollout is in progress.
	DisruptionBudget *DisruptionBudget `json:"disruptionBudget,omitempty"`

	// SuccessThreshold Percentage is the string format representing percentage string.
	SuccessThreshold *Percentage `json:"successThreshold,omitempty"`
}

RolloutPolicy RolloutPolicy is the rollout policy of the fleet.

func (*RolloutPolicy) Validate added in v0.4.0

func (r *RolloutPolicy) Validate() []error

type RolloutStrategy added in v0.4.0

type RolloutStrategy string

RolloutStrategy The strategy of choice for device selection in rollout policy.

const (
	RolloutStrategyBatchSequence RolloutStrategy = "BatchSequence"
)

Defines values for RolloutStrategy.

type SshConfig

type SshConfig struct {
	// PrivateKeyPassphrase The passphrase for sshPrivateKey.
	PrivateKeyPassphrase *string `json:"privateKeyPassphrase,omitempty"`

	// SkipServerVerification Skip remote server verification.
	SkipServerVerification *bool `json:"skipServerVerification,omitempty"`

	// SshPrivateKey Base64 encoded private SSH key.
	SshPrivateKey *string `json:"sshPrivateKey,omitempty"`
}

SshConfig Configuration for SSH transport.

type SshRepoSpec

type SshRepoSpec struct {
	// SshConfig Configuration for SSH transport.
	SshConfig SshConfig `json:"sshConfig"`

	// Type RepoSpecType is the type of the repository.
	Type RepoSpecType `json:"type"`

	// Url The SSH Git repository URL to clone from.
	Url string `json:"url"`
}

SshRepoSpec defines model for SshRepoSpec.

type Status

type Status struct {
	// Message A human-readable description of the status of this operation.
	Message *string `json:"message,omitempty"`

	// Reason A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
	Reason *string `json:"reason,omitempty"`

	// Status Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
	Status *string `json:"status,omitempty"`
}

Status Status is a return value for calls that don't return other objects.

type TemplateVersion

type TemplateVersion struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
	Metadata ObjectMeta `json:"metadata"`

	// Spec TemplateVersionSpec describes a version of a device template.
	Spec TemplateVersionSpec `json:"spec"`

	// Status TemplateVersionStatus represents information about the status of a template version.
	Status *TemplateVersionStatus `json:"status,omitempty"`
}

TemplateVersion TemplateVersion represents a version of a template.

type TemplateVersionList

type TemplateVersionList struct {
	// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
	ApiVersion string `json:"apiVersion"`

	// Items List of TemplateVersions.
	Items []TemplateVersion `json:"items"`

	// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
	Kind string `json:"kind"`

	// Metadata ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
	Metadata ListMeta `json:"metadata"`
}

TemplateVersionList TemplateVersionList is a list of TemplateVersions.

type TemplateVersionSpec

type TemplateVersionSpec struct {
	// Fleet The fleet whose template this refers to.
	Fleet string `json:"fleet"`
}

TemplateVersionSpec TemplateVersionSpec describes a version of a device template.

type TemplateVersionStatus

type TemplateVersionStatus struct {
	// Applications List of applications.
	Applications *[]ApplicationSpec `json:"applications,omitempty"`

	// Conditions Current state of the device.
	Conditions []Condition `json:"conditions"`

	// Config List of config providers.
	Config *[]ConfigProviderSpec `json:"config,omitempty"`

	// Decommissioning Metadata about a device decommissioning request.
	Decommissioning *DeviceDecommission `json:"decommissioning,omitempty"`

	// Os DeviceOsSpec describes the target OS for the device.
	Os *DeviceOsSpec `json:"os,omitempty"`

	// Resources Array of resource monitor configurations.
	Resources *[]ResourceMonitor `json:"resources,omitempty"`

	// Systemd The systemd services to monitor.
	Systemd *struct {
		// MatchPatterns A list of match patterns.
		MatchPatterns *[]string `json:"matchPatterns,omitempty"`
	} `json:"systemd,omitempty"`

	// UpdatePolicy Specifies the policy for managing device updates, including when updates should be downloaded and applied.
	UpdatePolicy *DeviceUpdatePolicySpec `json:"updatePolicy,omitempty"`

	// UpdatedAt The time at which the template was last updated.
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}

TemplateVersionStatus defines model for TemplateVersionStatus.

type TimeZone added in v0.4.0

type TimeZone = string

TimeZone Time zone identifiers follow the IANA format AREA/LOCATION, where AREA represents a continent or ocean, and LOCATION specifies a particular site within that area, for example America/New_York, Europe/Paris. Only unambiguous 3-character time zones are supported ("GMT", "UTC").

type UpdateCertificateSigningRequestApprovalJSONRequestBody added in v0.4.0

type UpdateCertificateSigningRequestApprovalJSONRequestBody = CertificateSigningRequest

UpdateCertificateSigningRequestApprovalJSONRequestBody defines body for UpdateCertificateSigningRequestApproval for application/json ContentType.

type UpdateSchedule added in v0.4.0

type UpdateSchedule struct {
	// At Cron expression format for scheduling times.
	// The format is `* * * * *`: - Minutes: `*` matches 0-59. - Hours: `*` matches 0-23. - Day of Month: `*` matches 1-31. - Month: `*` matches 1-12. - Day of Week: `*` matches 0-6.
	// Supported operators: - `*`: Matches any value (e.g., `*` in hours matches every hour). - `-`: Range (e.g., `0-8` for 12 AM to 8 AM). - `,`: List (e.g., `1,12` for 1st and 12th minute). - `/`: Step (e.g., `*/12` for every 12th minute). - Single value (e.g., `8` matches the 8th minute).
	// Example: `* 0-8,16-23 * * *`.
	At CronExpression `json:"at"`

	// StartGraceDuration The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours.
	StartGraceDuration *Duration `json:"startGraceDuration,omitempty"`

	// TimeZone Time zone identifiers follow the IANA format AREA/LOCATION, where AREA represents a continent or ocean, and LOCATION specifies a particular site within that area, for example America/New_York, Europe/Paris. Only unambiguous 3-character time zones are supported ("GMT", "UTC").
	TimeZone *TimeZone `json:"timeZone,omitempty"`
}

UpdateSchedule Defines the schedule for automatic downloading and updates, including timing and optional timeout.

func (UpdateSchedule) Validate added in v0.4.0

func (u UpdateSchedule) Validate() []error

type UpdateState added in v0.4.0

type UpdateState string
const (
	// The agent is validating the desired device spec and downloading
	// dependencies. No changes have been made to the device's configuration
	// yet.
	UpdateStatePreparing UpdateState = "Preparing"
	//  The agent has validated the desired spec, downloaded all dependencies,
	//  and is ready to update. No changes have been made to the device's
	//  configuration yet.
	UpdateStateReadyToUpdate UpdateState = "ReadyToUpdate"
	// The agent has started the update transaction and is writing the update to
	// disk.
	UpdateStateApplyingUpdate UpdateState = "ApplyingUpdate"
	// The agent initiated a reboot required to activate the new OS image and configuration.
	UpdateStateRebooting UpdateState = "Rebooting"
	// The agent has successfully completed the update and the device is
	// conforming to its device spec. Note that the device's update status may
	// still be reported as `OutOfDate` if the device spec is not yet at the
	// same version as the fleet's device template
	UpdateStateUpdated UpdateState = "Updated"
	// The agent has canceled the update because the desired spec was reverted
	// to the current spec before the update process started.
	UpdateStateCanceled UpdateState = "Canceled"
	// The agent failed to apply the desired spec and will not retry. The
	// device's OS image and configuration have been rolled back to the
	// pre-update version and have been activated
	UpdateStateError UpdateState = "Error"
	// The agent has detected an error and is rolling back to the pre-update OS
	// image and configuration.
	UpdateStateRollingBack UpdateState = "RollingBack"
	// The agent failed to apply the desired spec and will retry. The device's
	// OS image and configuration have been rolled back to the pre-update
	// version and have been activated.
	UpdateStateRetrying UpdateState = "Retrying"
)

type Validator

type Validator interface {
	Validate() []error
}

type Version added in v0.4.0

type Version struct {
	// Version Git version of the service.
	Version string `json:"version"`
}

Version defines model for Version.

Directories

Path Synopsis
Package v1alpha1 provides primitives to interact with the openapi HTTP API.
Package v1alpha1 provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL