Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the styra v1beta1 API group.
Index ¶
- Variables
- type AllowedMapping
- type ColumnMapping
- type Condition
- type ConditionType
- type Datasource
- type DecisionMapping
- type Expected
- type GitRepo
- type LocalPlane
- type ReasonMapping
- type SourceControl
- type Subject
- type SubjectKind
- type System
- func (in *System) DeepCopy() *System
- func (in *System) DeepCopyInto(out *System)
- func (in *System) DeepCopyObject() runtime.Object
- func (s *System) Default()
- func (s *System) DisplayName(prefix, suffix string) string
- func (s *System) GitSecretID() string
- func (s *System) SetCondition(conditionType ConditionType, status metav1.ConditionStatus)
- func (s *System) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (s *System) ValidateCreate() error
- func (s *System) ValidateDelete() error
- func (s *System) ValidateUpdate(_ runtime.Object) error
- type SystemList
- type SystemPhase
- type SystemSpec
- type SystemStatus
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "styra.bankdata.dk", Version: "v1beta1"} // 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 AllowedMapping ¶
type AllowedMapping struct { // Expected is the value we expect to be set in the Path in order to consider // the decision allowed. Expected *Expected `json:"expected,omitempty"` // Negated negates the expectation. //+kubebuilder:validation:Optional Negated bool `json:"negated,omitempty"` // Path is the path to the value which we check our expectation against. Path string `json:"path"` }
AllowedMapping specifies how to determine if a decision is allowed or not.
func (*AllowedMapping) DeepCopy ¶
func (in *AllowedMapping) DeepCopy() *AllowedMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedMapping.
func (*AllowedMapping) DeepCopyInto ¶
func (in *AllowedMapping) DeepCopyInto(out *AllowedMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ColumnMapping ¶
type ColumnMapping struct { // Key is the name of the column as shown in the decision log. Key string `json:"key"` // Path is where in the decision result the value for the column is found. Path string `json:"path"` }
ColumnMapping specifies how a value in the decision result should be mapped to a column in the Styra decision log.
func (*ColumnMapping) DeepCopy ¶
func (in *ColumnMapping) DeepCopy() *ColumnMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ColumnMapping.
func (*ColumnMapping) DeepCopyInto ¶
func (in *ColumnMapping) DeepCopyInto(out *ColumnMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Condition ¶
type Condition struct { // Type is the ConditionType of the Condition. Type ConditionType `json:"type"` // Status is the status of the Condition. Status metav1.ConditionStatus `json:"status"` // LastProbeTime is a timestamp for the last time the condition was checked. LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` // LastTransitionTime is a timestamp for the last time that the condition // changed state. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` }
Condition represents a System condition.
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionType ¶
type ConditionType string
ConditionType is a System Condition type.
const ( // ConditionTypeCreatedInStyra is a ConditionType used when the system has // been created in Styra. ConditionTypeCreatedInStyra ConditionType = "CreatedInStyra" // ConditionTypeGitCredentialsUpdated is a ConditionType used when git // credentials are updated in Styra. ConditionTypeGitCredentialsUpdated ConditionType = "GitCredentialsUpdated" // ConditionTypeSubjectsUpdated is a ConditionType used when the subjects of // the System are updated in Styra. ConditionTypeSubjectsUpdated ConditionType = "SubjectsUpdated" // ConditionTypeDatasourcesUpdated is a ConditionType used when // the datasources of the System are updated in Styra. ConditionTypeDatasourcesUpdated ConditionType = "DatasourcesUpdated" // ConditionTypeOPAConfigMapUpdated is a ConditionType used when // the ConfigMap for the OPA are updated in the cluster. ConditionTypeOPAConfigMapUpdated ConditionType = "OPAConfigMapUpdated" // ConditionTypeOPATokenUpdated is a ConditionType used when // the secret with the Styra token has been updated in the cluster. ConditionTypeOPATokenUpdated ConditionType = "OPATokenUpdated" // ConditionTypeSLPConfigMapUpdated is a COnditionType used when // the ConfigMap for the SLP are updated in the cluster. ConditionTypeSLPConfigMapUpdated ConditionType = "SLPConfigMapUpdated" // ConditionTypeSystemConfigUpdated is a ConditionType used when // the configuration of the System are updated in Styra. ConditionTypeSystemConfigUpdated ConditionType = "SystemConfigUpdated" )
type Datasource ¶
type Datasource struct { // Path is the path within the system where the datasource should reside. Path string `json:"path"` }
Datasource represents a Styra datasource to be mounted in the system.
func (*Datasource) DeepCopy ¶
func (in *Datasource) DeepCopy() *Datasource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Datasource.
func (*Datasource) DeepCopyInto ¶
func (in *Datasource) DeepCopyInto(out *Datasource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DecisionMapping ¶
type DecisionMapping struct { // Name is the name of the decision mapping. //+kubebuilder:validation:Optional Name string `json:"name"` // Columns holds a list of ColumnMapping for the decision mapping. Columns []ColumnMapping `json:"columns,omitempty"` //+kubebuilder:validation:Optional Reason ReasonMapping `json:"reason,omitempty"` Allowed *AllowedMapping `json:"allowed,omitempty"` }
DecisionMapping specifies how a system decision mapping should be configured. This allows configuration of when a decision is considered allowed or not. It also provides the ability to show additional columns in Styra.
func (*DecisionMapping) DeepCopy ¶
func (in *DecisionMapping) DeepCopy() *DecisionMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DecisionMapping.
func (*DecisionMapping) DeepCopyInto ¶
func (in *DecisionMapping) DeepCopyInto(out *DecisionMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Expected ¶
type Expected struct { // String holds a pointer to a string if the Expected value represents a // string. //+kubebuilder:validation:Optional String *string `json:"string,omitempty"` // Boolean holds a pointer to a bool if the Expected value represents a // bool. //+kubebuilder:validation:Optional Boolean *bool `json:"boolean,omitempty"` // Integer holds a pointer to an int if the Expected value represents an int. //+kubebuilder:validation:Optional Integer *int `json:"integer,omitempty"` }
Expected represents an expected value. When using this type only one of the fields should be set.
func (*Expected) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Expected.
func (*Expected) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GitRepo ¶
type GitRepo struct { // CredentialsSecretName is a reference to an existing secret which holds git // credentials. This secret should have the keys `name` and `secret`. The // `name` key should contain the http basic auth username and the `secret` // key should contain the http basic auth password. CredentialsSecretName string `json:"credentialsSecretName,omitempty"` // Path is the path in the git repo where the policies are located. Path string `json:"path,omitempty"` // Reference is used to point to a tag or branch. This will be ignored if // `Commit` is specified. Reference string `json:"reference,omitempty"` // Commit is used to point to a specific commit SHA. This takes precedence // over `Reference` if both are specified. Commit string `json:"commit,omitempty"` // URL is the URL of the git repo. URL string `json:"url"` }
GitRepo specifies the configuration for how to pull policy from git.
func (*GitRepo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepo.
func (*GitRepo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalPlane ¶
type LocalPlane struct { // Name is the hostname of the SLP service. Name string `json:"name"` }
LocalPlane specifies how the Styra Local Plane should be configured. This is used to generate Secret and ConfigMap for the SLP to consume.
func (*LocalPlane) DeepCopy ¶
func (in *LocalPlane) DeepCopy() *LocalPlane
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalPlane.
func (*LocalPlane) DeepCopyInto ¶
func (in *LocalPlane) DeepCopyInto(out *LocalPlane)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReasonMapping ¶
type ReasonMapping struct { // Path is the path to where the reason is found in the decision result. Path string `json:"path,omitempty"` }
ReasonMapping specifies where the reason of the decision can be found.
func (*ReasonMapping) DeepCopy ¶
func (in *ReasonMapping) DeepCopy() *ReasonMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReasonMapping.
func (*ReasonMapping) DeepCopyInto ¶
func (in *ReasonMapping) DeepCopyInto(out *ReasonMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SourceControl ¶
type SourceControl struct {
Origin GitRepo `json:"origin"`
}
SourceControl holds SourceControl configuration.
func (*SourceControl) DeepCopy ¶
func (in *SourceControl) DeepCopy() *SourceControl
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceControl.
func (*SourceControl) DeepCopyInto ¶
func (in *SourceControl) DeepCopyInto(out *SourceControl)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Subject ¶
type Subject struct { // Kind is the SubjectKind of the subject. //+kubebuilder:validation:Enum=user;group Kind SubjectKind `json:"kind,omitempty"` // Name is the name of the subject. The meaning of this field depends on the // SubjectKind. Name string `json:"name"` }
Subject represents a subject which has been granted access to the system. The subject is assigned the roles set in the controller configuration file.
func (*Subject) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subject.
func (*Subject) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubjectKind ¶
type SubjectKind string
SubjectKind represents a kind of a subject.
const ( // SubjectKindUser is the subject kind user. SubjectKindUser SubjectKind = "user" // SubjectKindGroup is the subject kind group. SubjectKindGroup SubjectKind = "group" )
type System ¶
type System struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec is the specification of the System resource. Spec SystemSpec `json:"spec,omitempty"` // Status is the status of the System resource. Status SystemStatus `json:"status,omitempty"` }
System is the Schema for the Systems API.
func (*System) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new System.
func (*System) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*System) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*System) Default ¶
func (s *System) Default()
Default implements webhook.Defaulter so that a webhook can be registered for the type.
func (*System) DisplayName ¶
DisplayName returns the System's name with a prefix and suffix.
func (*System) GitSecretID ¶
GitSecretID returns the Styra internal ID of the Git Secret used by the System.
func (*System) SetCondition ¶
func (s *System) SetCondition(conditionType ConditionType, status metav1.ConditionStatus)
SetCondition updates the matching condition under the System's status field.
func (*System) SetupWebhookWithManager ¶
SetupWebhookWithManager registers the System webhooks with the Manager.
func (*System) ValidateCreate ¶
ValidateCreate implements webhook.Validator so that a webhook can be registered for the type.
func (*System) ValidateDelete ¶
ValidateDelete implements webhook.Validator so that a webhook will be registered for the type.
type SystemList ¶
type SystemList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []System `json:"items"` }
SystemList represents a list of System resources.
func (*SystemList) DeepCopy ¶
func (in *SystemList) DeepCopy() *SystemList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemList.
func (*SystemList) DeepCopyInto ¶
func (in *SystemList) DeepCopyInto(out *SystemList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SystemList) DeepCopyObject ¶
func (in *SystemList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SystemPhase ¶
type SystemPhase string
SystemPhase is a status phase of the System.
const ( // SystemPhasePending is a SystemPhase used when the System has not yet been // reconciled. SystemPhasePending SystemPhase = "Pending" // SystemPhaseFailed is a SystemPhase used when the System failed to // reconcile. SystemPhaseFailed SystemPhase = "Failed" // SystemPhaseCreated is a SystemPhase used when the System is fully // reconciled. SystemPhaseCreated SystemPhase = "Created" )
type SystemSpec ¶
type SystemSpec struct { // DeletionProtection disables deletion of the system in Styra, when the // System resource is deleted. DeletionProtection *bool `json:"deletionProtection,omitempty"` // Subjects is the list of subjects which should have access to the system. Subjects []Subject `json:"subjects,omitempty"` // DecisionMappings holds the list of decision mappings for the system. DecisionMappings []DecisionMapping `json:"decisionMappings,omitempty"` // Datasources represents a list of Styra datasources to be mounted in the system. Datasources []Datasource `json:"datasources,omitempty"` SourceControl *SourceControl `json:"sourceControl,omitempty"` LocalPlane *LocalPlane `json:"localPlane,omitempty"` }
SystemSpec is the specification of the System resource.
func (*SystemSpec) DeepCopy ¶
func (in *SystemSpec) DeepCopy() *SystemSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemSpec.
func (*SystemSpec) DeepCopyInto ¶
func (in *SystemSpec) DeepCopyInto(out *SystemSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SystemStatus ¶
type SystemStatus struct { // ID is the system ID in Styra. ID string `json:"id,omitempty"` // Ready is true when the system is created and in sync. Ready bool `json:"ready"` // Phase is the current state of syncing the system. //+kubebuilder:default=Pending //+kubebuilder:validation:Enum=Pending;Failed;Created Phase SystemPhase `json:"phase,omitempty"` // Failure message holds a message when Phase is Failed. FailureMessage string `json:"failureMessage,omitempty"` // Conditions holds a list of Condition which describes the state of the // System. Conditions []Condition `json:"conditions,omitempty"` }
SystemStatus defines the observed state of System.
func (*SystemStatus) DeepCopy ¶
func (in *SystemStatus) DeepCopy() *SystemStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemStatus.
func (*SystemStatus) DeepCopyInto ¶
func (in *SystemStatus) DeepCopyInto(out *SystemStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.