v1

package
v0.0.0-...-fc01a29 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the config v1 API group +kubebuilder:object:generate=true +groupName=config.polyglot.systems

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "config.polyglot.systems", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Alert

type Alert struct {
	// AlertType - valid values are: 'email' and 'logger'
	AlertType string `json:"type"`
	// AlertName is a simple DNS/k8s compliant name for identification purposes
	AlertName string `json:"name"`
	// AlertConfiguration is optional when only using `logger` as the AlertType, but with SMTP it must be defined
	AlertConfiguration AlertConfiguration `json:"config,omitempty"`
}

Alert provides the structure of the type of Alert

func (*Alert) DeepCopy

func (in *Alert) DeepCopy() *Alert

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Alert.

func (*Alert) DeepCopyInto

func (in *Alert) DeepCopyInto(out *Alert)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AlertConfiguration

type AlertConfiguration struct {
	// ReportInterval is the frequency in which Reports would be sent out - can be `daily`, `weekly`, `monthly`, or `debug` which is every 5 minutes.  Defaults to daily.
	ReportInterval string `json:"reportInterval,omitempty"`
	// SMTPDestinationEmailAddresses is where the alert messages will be sent TO
	SMTPDestinationEmailAddresses []string `json:"smtp_destination_addresses,omitempty"`
	// SMTPSenderEmailAddress is the address that will be used to send the alert messages
	SMTPSenderEmailAddress string `json:"smtp_sender_address,omitempty"`
	// SMTPSenderHostname is the hostname used during SMTP handshake
	SMTPSenderHostname string `json:"smtp_sender_hostname,omitempty"`
	// SMTPEndpoint is the SMTP server with affixed port ie, smtp.example.com:25
	SMTPEndpoint string `json:"smtp_endpoint,omitempty"`
	// SMTPAuthSecretName is the name of the K8s Secret that holds the authentication information
	SMTPAuthSecretName string `json:"smtp_auth_secret,omitempty"`
	// SMTPAuthType can be either `none`, `plain`, `login`, or `cram-md5`
	SMTPAuthType string `json:"smtp_auth_type,omitempty"`
	// SMTPAuthUseSSL can be used to set the use of TLS, default is true
	SMTPAuthUseSSL *bool `json:"smtp_use_ssl,omitempty"`
	// SMTPAuthUseSTARTTLS can be used to set the use of STARTTLS, default is true
	SMTPAuthUseSTARTTLS *bool `json:"smtp_use_starttls,omitempty"`
}

AlertConfiguration provides the structure of the AlertConfigurations for different Alert Endpoints

func (*AlertConfiguration) DeepCopy

func (in *AlertConfiguration) DeepCopy() *AlertConfiguration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertConfiguration.

func (*AlertConfiguration) DeepCopyInto

func (in *AlertConfiguration) DeepCopyInto(out *AlertConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CertificateInformation

type CertificateInformation struct {
	// Namespace provides what namespace the certificate object was found in
	Namespace string `json:"namespace"`
	// Name provides the name of the certificate object
	Name string `json:"name"`
	// Kind provides the kind of the certificate object
	Kind string `json:"kind"`
	// APIVersion corresponds to the target kind apiVersion, so v1 is all really
	APIVersion string `json:"apiVersion"`
	// DataKey is the key for the data structure found
	DataKey string `json:"dataKey"`
	// Expiration is the expiration date in YYYY-MM-DD
	Expiration string `json:"expiration"`
	// Name provides the name of the certificate object
	CommonName string `json:"commonName"`
	// CertificateAuthorityCommonName provides the Common Name of the signing Certificate Authority
	CertificateAuthorityCommonName string `json:"certificateAuthorityCommonName"`
	// IsCertificateAuthority returns a bool if the certificate is a CA
	IsCertificateAuthority bool `json:"isCertificateAuthority"`
	// TriggeredDaysOut provides the slice of days out that triggered the watch
	TriggeredDaysOut []int `json:"triggeredDaysOut,omitempty"`
}

CertificateInformation provides the status structure of what certificates have been discovered on the cluster

func (*CertificateInformation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateInformation.

func (*CertificateInformation) DeepCopyInto

func (in *CertificateInformation) DeepCopyInto(out *CertificateInformation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CertificateSentinel

type CertificateSentinel struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CertificateSentinelSpec   `json:"spec,omitempty"`
	Status CertificateSentinelStatus `json:"status,omitempty"`
}

CertificateSentinel is the Schema for the certificatesentinels API

func (*CertificateSentinel) DeepCopy

func (in *CertificateSentinel) DeepCopy() *CertificateSentinel

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSentinel.

func (*CertificateSentinel) DeepCopyInto

func (in *CertificateSentinel) DeepCopyInto(out *CertificateSentinel)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CertificateSentinel) DeepCopyObject

func (in *CertificateSentinel) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CertificateSentinelList

type CertificateSentinelList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CertificateSentinel `json:"items"`
}

CertificateSentinelList contains a slice of CertificateSentinel

func (*CertificateSentinelList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSentinelList.

func (*CertificateSentinelList) DeepCopyInto

func (in *CertificateSentinelList) DeepCopyInto(out *CertificateSentinelList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CertificateSentinelList) DeepCopyObject

func (in *CertificateSentinelList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CertificateSentinelSpec

type CertificateSentinelSpec struct {
	// Targets is the definition of K8s Objects to watch on the cluster and with what ServiceAccount
	Target Target `json:"target"`

	// Alerts is where the alerts will be sent to
	Alert Alert `json:"alert"`

	// ScanningInterval is how frequently the controller scans the cluster for these targets - defaults to 60s
	ScanningInterval int `json:"scanningInterval,omitempty"`

	// LogLevel controls the verbosity of the  - defaults to 1
	LogLevel int `json:"logLevel,omitempty"`
}

CertificateSentinelSpec defines the desired state of CertificateSentinel

func (*CertificateSentinelSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSentinelSpec.

func (*CertificateSentinelSpec) DeepCopyInto

func (in *CertificateSentinelSpec) DeepCopyInto(out *CertificateSentinelSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CertificateSentinelStatus

type CertificateSentinelStatus struct {
	// DiscoveredCertificates is the slice of CertificateInformation that list the total set of discovered certificates
	DiscoveredCertificates []CertificateInformation `json:"discoveredCertificates"`
	// ExpiringCertificates is the number of certificates that are expiring
	ExpiringCertificates int `json:"expiringCertificates,omitempty"`
	// LastReportSent is last time the report was sent out
	LastReportSent int64 `json:"lastReportSent,omitempty"`
}

CertificateSentinelStatus defines the observed state of CertificateSentinel

func (*CertificateSentinelStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSentinelStatus.

func (*CertificateSentinelStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KeystoreInformation

type KeystoreInformation struct {
	// Namespace provides what namespace the Keystore object was found in
	Namespace string `json:"namespace"`
	// Name provides the name of the Keystore object
	Name string `json:"name"`
	// Kind provides the kind of the Keystore object
	Kind string `json:"kind"`
	// APIVersion corresponds to the target kind apiVersion, so v1 is all really
	APIVersion string `json:"apiVersion"`
	// DataKey is the key for the data structure found
	DataKey string `json:"dataKey"`
	// KeystoreAlias is the key for the data structure found
	KeystoreAlias string `json:"keystoreAlias"`
	// Expiration is the expiration date in YYYY-MM-DD
	Expiration string `json:"expiration"`
	// Name provides the name of the certificate object
	CommonName string `json:"commonName"`
	// CertificateAuthorityCommonName provides the Common Name of the signing Certificate Authority
	CertificateAuthorityCommonName string `json:"certificateAuthorityCommonName"`
	// IsCertificateAuthority returns a bool if the certificate is a CA
	IsCertificateAuthority bool `json:"isCertificateAuthority"`
	// TriggeredDaysOut provides the slice of days out that triggered the watch
	TriggeredDaysOut []int `json:"triggeredDaysOut,omitempty"`
}

KeystoreInformation provides the status structure of what keystores have certificates that have been discovered on the cluster

func (*KeystoreInformation) DeepCopy

func (in *KeystoreInformation) DeepCopy() *KeystoreInformation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeystoreInformation.

func (*KeystoreInformation) DeepCopyInto

func (in *KeystoreInformation) DeepCopyInto(out *KeystoreInformation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KeystorePassword

type KeystorePassword struct {
	// Type could be 'secret', 'labels', or 'plaintext'
	Type      string          `json:"type"`
	Plaintext string          `json:"plaintext,omitempty"`
	Secret    SecretReference `json:"secretRef,omitempty"`
	Labels    LabelReference  `json:"labelRef,omitempty"`
}

KeystorePassword provides the input for the Keystore Password

func (*KeystorePassword) DeepCopy

func (in *KeystorePassword) DeepCopy() *KeystorePassword

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeystorePassword.

func (*KeystorePassword) DeepCopyInto

func (in *KeystorePassword) DeepCopyInto(out *KeystorePassword)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KeystoreSentinel

type KeystoreSentinel struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   KeystoreSentinelSpec   `json:"spec,omitempty"`
	Status KeystoreSentinelStatus `json:"status,omitempty"`
}

KeystoreSentinel is the Schema for the keystoresentinels API

func (*KeystoreSentinel) DeepCopy

func (in *KeystoreSentinel) DeepCopy() *KeystoreSentinel

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeystoreSentinel.

func (*KeystoreSentinel) DeepCopyInto

func (in *KeystoreSentinel) DeepCopyInto(out *KeystoreSentinel)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KeystoreSentinel) DeepCopyObject

func (in *KeystoreSentinel) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KeystoreSentinelList

type KeystoreSentinelList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []KeystoreSentinel `json:"items"`
}

KeystoreSentinelList contains a list of KeystoreSentinel

func (*KeystoreSentinelList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeystoreSentinelList.

func (*KeystoreSentinelList) DeepCopyInto

func (in *KeystoreSentinelList) DeepCopyInto(out *KeystoreSentinelList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KeystoreSentinelList) DeepCopyObject

func (in *KeystoreSentinelList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KeystoreSentinelSpec

type KeystoreSentinelSpec struct {
	// Target is the K8s Objects to watch on the cluster
	Target KeystoreTarget `json:"target"`

	// Alert is where the alerts will be sent to
	Alert Alert `json:"alert"`

	// ScanningInterval is how frequently the controller scans the cluster for these targets - defaults to 30s
	ScanningInterval int `json:"scanningInterval,omitempty"`

	// LogLevel controls the verbosity of the  - defaults to 1
	LogLevel int `json:"logLevel,omitempty"`
}

KeystoreSentinelSpec defines the desired state of KeystoreSentinel

func (*KeystoreSentinelSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeystoreSentinelSpec.

func (*KeystoreSentinelSpec) DeepCopyInto

func (in *KeystoreSentinelSpec) DeepCopyInto(out *KeystoreSentinelSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KeystoreSentinelStatus

type KeystoreSentinelStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	DiscoveredKeystoreCertificates []KeystoreInformation `json:"discoveredKeystoreCertificates"`
	// ExpiringCertificates is the number of certificates that are expiring
	ExpiringCertificates int `json:"expiringCertificates,omitempty"`
	// TotalKeystoresFound is the number of Keystores found in scope
	TotalKeystoresFound int `json:"totalKeystoresFound,omitempty"`
	// KeystoresAtRisk is the number of Keystores that have expiring certificates
	KeystoresAtRisk int `json:"keystoresAtRisk,omitempty"`
	// LastReportSent is the time the report has been sent out by this Operator controller and when
	LastReportSent int64 `json:"lastReportSent,omitempty"`
}

KeystoreSentinelStatus defines the observed state of KeystoreSentinel

func (*KeystoreSentinelStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeystoreSentinelStatus.

func (*KeystoreSentinelStatus) DeepCopyInto

func (in *KeystoreSentinelStatus) DeepCopyInto(out *KeystoreSentinelStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KeystoreTarget

type KeystoreTarget struct {
	// TargetName is a simple DNS/k8s compliant name for identification purposes
	TargetName string `json:"name"`
	// Namespaces is the slice of namespaces to watch on the cluster - can be a single wildcard to watch all namespaces
	Namespaces []string `json:"namespaces"`
	// NamespaceLabels is an optional slice of key pair labels to target, which will limit the scope of the matched namespaces to only ones with those labels
	NamespaceLabels []LabelSelector `json:"namespaceLabels,omitempty"`
	// Kind can be either ConfigMap or Secret
	Kind string `json:"kind"`
	// APIVersion corresponds to the target kind apiVersion, so v1 is all really
	APIVersion string `json:"apiVersion"`
	// TargetLabels is an optional slice of key pair labels to target, which will limit the scope of the matched objects to only ones with those labels
	TargetLabels []LabelSelector `json:"targetLabels,omitempty"`
	// ServiceAccount is the ServiceAccount to use in order to scan the cluster - this allows for separate RBAC per targeted object
	ServiceAccount string `json:"serviceAccount"`
	// DaysOut is the slice of days out alerts should be triggered at.  Defaults to 30, 60, and 90
	DaysOut []int `json:"daysOut,omitempty"`
	// KeystorePassword corresponds to the source for the the KeystorePassword
	KeystorePassword KeystorePassword `json:"keystorePassword"`
}

KeystoreTarget provide what sort of objects we're watching for, be that a ConfigMap or a Secret

func (*KeystoreTarget) DeepCopy

func (in *KeystoreTarget) DeepCopy() *KeystoreTarget

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeystoreTarget.

func (*KeystoreTarget) DeepCopyInto

func (in *KeystoreTarget) DeepCopyInto(out *KeystoreTarget)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LabelReference

type LabelReference struct {
	LabelSelectors []LabelSelector `json:"labelSelectors"`
	Key            string          `json:"key"`
}

LabelReference provides the internal Secret reference to unlock the Keystore

func (*LabelReference) DeepCopy

func (in *LabelReference) DeepCopy() *LabelReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelReference.

func (*LabelReference) DeepCopyInto

func (in *LabelReference) DeepCopyInto(out *LabelReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LabelSelector

type LabelSelector struct {
	Key    string   `json:"key"`
	Filter string   `json:"filter,omitempty"`
	Values []string `json:"value"`
}

LabelSelector is a struct to target specific assets with matching labels

func (*LabelSelector) DeepCopy

func (in *LabelSelector) DeepCopy() *LabelSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelector.

func (*LabelSelector) DeepCopyInto

func (in *LabelSelector) DeepCopyInto(out *LabelSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SecretReference

type SecretReference struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

SecretReference provides the internal Secret reference to unlock the Keystore

func (*SecretReference) DeepCopy

func (in *SecretReference) DeepCopy() *SecretReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference.

func (*SecretReference) DeepCopyInto

func (in *SecretReference) DeepCopyInto(out *SecretReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Target

type Target struct {
	// TargetName is a simple DNS/k8s compliant name for identification purposes
	TargetName string `json:"name"`
	// Namespaces is the slice of namespaces to watch on the cluster - can be a single wildcard to watch all namespaces
	Namespaces []string `json:"namespaces"`
	// NamespaceLabels is an optional slice of key pair labels to target, which will limit the scope of the matched namespaces to only ones with those labels
	NamespaceLabels []LabelSelector `json:"namespaceLabels,omitempty"`
	// Kind can be either ConfigMap or Secret
	Kind string `json:"kind"`
	// APIVersion corresponds to the target kind apiVersion, so v1 is all really
	APIVersion string `json:"apiVersion"`
	// TargetLabels is an optional slice of key pair labels to target, which will limit the scope of the matched objects to only ones with those labels
	TargetLabels []LabelSelector `json:"targetLabels,omitempty"`
	// ServiceAccount is the ServiceAccount to use in order to scan the cluster - this allows for separate RBAC per targeted object
	ServiceAccount string `json:"serviceAccount"`
	// DaysOut is the slice of days out alerts should be triggered at.  Defaults to 30, 60, and 90
	DaysOut []int `json:"daysOut,omitempty"`
}

Target provide what sort of objects we're watching for, be that a ConfigMap or a Secret

func (*Target) DeepCopy

func (in *Target) DeepCopy() *Target

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Target.

func (*Target) DeepCopyInto

func (in *Target) DeepCopyInto(out *Target)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TimeSlice

type TimeSlice struct {
	Time    metav1.Time
	DaysOut int
}

TimeSlice provides the k:v pairing for expiration dates and what daysOut gate triggered it

func (*TimeSlice) DeepCopy

func (in *TimeSlice) DeepCopy() *TimeSlice

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeSlice.

func (*TimeSlice) DeepCopyInto

func (in *TimeSlice) DeepCopyInto(out *TimeSlice)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TimeSlices

type TimeSlices []TimeSlice

TimeSlices is just a simple TimeSlice slice

func (TimeSlices) DeepCopy

func (in TimeSlices) DeepCopy() TimeSlices

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeSlices.

func (TimeSlices) DeepCopyInto

func (in TimeSlices) DeepCopyInto(out *TimeSlices)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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