v1alpha1

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the irsa v1alpha1 API group +kubebuilder:object:generate=true +groupName=irsa.voodoo.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "irsa.voodoo.io", Version: "v1alpha1"}

	// 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

func StatementEquals

func StatementEquals(a, b []StatementSpec) bool

StatementEquals is used to detect meaningful difference between 2 StatementSpec slices ie : order of elements is not taken into account

Types

type CrCondition

type CrCondition string

poorman's golang enum

var (
	CrSubmitted   CrCondition = ""
	CrPending     CrCondition = "pending"
	CrProgressing CrCondition = "progressing"
	CrOK          CrCondition = "created"
	CrDeleting    CrCondition = "deleting"
	CrError       CrCondition = "error"
)

func (CrCondition) String

func (i CrCondition) String() string

type IamRoleServiceAccount

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

	Spec   IamRoleServiceAccountSpec   `json:"spec,omitempty"`
	Status IamRoleServiceAccountStatus `json:"status,omitempty"`
}

IamRoleServiceAccount is the Schema for the iamroleserviceaccounts API

func NewIamRoleServiceAccount

func NewIamRoleServiceAccount(name, ns string, policyspec PolicySpec) *IamRoleServiceAccount

NewIamRoleServiceAccount is the IamRoleServiceAccount constructor

func (*IamRoleServiceAccount) DeepCopy

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

func (*IamRoleServiceAccount) DeepCopyInto

func (in *IamRoleServiceAccount) DeepCopyInto(out *IamRoleServiceAccount)

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

func (*IamRoleServiceAccount) DeepCopyObject

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

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

func (IamRoleServiceAccount) FullName added in v0.1.0

func (irsa IamRoleServiceAccount) FullName() string

func (IamRoleServiceAccount) HasStatus

func (irsa IamRoleServiceAccount) HasStatus(st fmt.Stringer) bool

HasStatus is used in tests, should be moved there

func (IamRoleServiceAccount) IsPendingDeletion

func (irsa IamRoleServiceAccount) IsPendingDeletion() bool

IsPendingDeletion helps us to detect if the resource should be deleted

func (IamRoleServiceAccount) Validate

func (irsa IamRoleServiceAccount) Validate() error

Validate returns an error if the IamRoleServiceAccountSpec is not valid

type IamRoleServiceAccountList

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

IamRoleServiceAccountList contains a list of IamRoleServiceAccount

func (*IamRoleServiceAccountList) DeepCopy

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

func (*IamRoleServiceAccountList) DeepCopyInto

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

func (*IamRoleServiceAccountList) DeepCopyObject

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

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

type IamRoleServiceAccountSpec

type IamRoleServiceAccountSpec struct {
	Policy PolicySpec `json:"policy"`
}

IamRoleServiceAccountSpec defines the desired state of IamRoleServiceAccount

func (*IamRoleServiceAccountSpec) DeepCopy

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

func (*IamRoleServiceAccountSpec) DeepCopyInto

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

type IamRoleServiceAccountStatus

type IamRoleServiceAccountStatus struct {
	Condition IrsaCondition `json:"condition"`
	Reason    string        `json:"reason,omitempty"`
}

IamRoleServiceAccountStatus defines the observed state of IamRoleServiceAccount

func (*IamRoleServiceAccountStatus) DeepCopy

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

func (*IamRoleServiceAccountStatus) DeepCopyInto

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

type IrsaCondition

type IrsaCondition string
var (
	IrsaSubmitted      IrsaCondition = ""
	IrsaPending        IrsaCondition = "pending"
	IrsaSaNameConflict IrsaCondition = "saNameConflict"
	IrsaForbidden      IrsaCondition = "forbidden"
	IrsaFailed         IrsaCondition = "failed"
	IrsaProgressing    IrsaCondition = "progressing"
	IrsaOK             IrsaCondition = "created"
)

func (IrsaCondition) String

func (i IrsaCondition) String() string

String is just used for comparison in HasStatus

type Policy

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

	Spec   PolicySpec   `json:"spec,omitempty"`
	Status PolicyStatus `json:"status,omitempty"`
}

Policy is the Schema for the awspolicies API

func NewPolicy

func NewPolicy(name, ns string, stm []StatementSpec) *Policy

NewPolicy constructs a Policy, setting mandatory fields for us

func (Policy) AwsName

func (p Policy) AwsName(cN string) string

AwsName is the name the resource will have on AWS It must be unique per AWS account thus the naming convention

func (*Policy) DeepCopy

func (in *Policy) DeepCopy() *Policy

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

func (*Policy) DeepCopyInto

func (in *Policy) DeepCopyInto(out *Policy)

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

func (*Policy) DeepCopyObject

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

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

func (Policy) FullName added in v0.1.0

func (p Policy) FullName() string

func (Policy) HasStatus

func (p Policy) HasStatus(st fmt.Stringer) bool

HasStatus is used in tests, should be moved there

func (Policy) IsPendingDeletion

func (p Policy) IsPendingDeletion() bool

IsPendingDeletion helps us to detect if a Policy should be deleted

func (Policy) Path

func (p Policy) Path(cN string) string

Path is the "file" where the policy will be available

func (Policy) PathPrefix

func (p Policy) PathPrefix(cN string) string

PathPrefix is the "directory" where the policy will be available It's used to retrieved a policy on AWS

func (Policy) Validate

func (p Policy) Validate(cN string) error

Validate returns an error if the Policy is not valid

type PolicyList

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

PolicyList contains a list of Policy

func (*PolicyList) DeepCopy

func (in *PolicyList) DeepCopy() *PolicyList

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

func (*PolicyList) DeepCopyInto

func (in *PolicyList) DeepCopyInto(out *PolicyList)

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

func (*PolicyList) DeepCopyObject

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

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

type PolicySpec

type PolicySpec struct {
	ARN       string          `json:"arn,omitempty"` // the ARN of the aws policy
	Statement []StatementSpec `json:"statement"`
}

PolicySpec describes the policy that must be present on AWS

func (*PolicySpec) DeepCopy

func (in *PolicySpec) DeepCopy() *PolicySpec

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

func (*PolicySpec) DeepCopyInto

func (in *PolicySpec) DeepCopyInto(out *PolicySpec)

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

func (PolicySpec) Validate

func (spec PolicySpec) Validate() error

Validate returns an error if the PolicySpec is not valid

type PolicyStatus

type PolicyStatus struct {
	Condition CrCondition `json:"condition"`
	Reason    string      `json:"reason,omitempty"`
}

PolicyStatus defines the observed state of Policy

func NewPolicyStatus added in v0.1.0

func NewPolicyStatus(condition CrCondition, reason string) PolicyStatus

func (*PolicyStatus) DeepCopy

func (in *PolicyStatus) DeepCopy() *PolicyStatus

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

func (*PolicyStatus) DeepCopyInto

func (in *PolicyStatus) DeepCopyInto(out *PolicyStatus)

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

type Role

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

	Spec   RoleSpec   `json:"spec,omitempty"`
	Status RoleStatus `json:"status,omitempty"`
}

Role is the Schema for the awsroles API

func NewRole

func NewRole(name, ns string) *Role

NewRole constructs a Role, setting mandatory fields for us

func (Role) AwsName

func (r Role) AwsName(cN string) string

AwsName is the name the resource will have on AWS It must be unique per AWS account thus the naming convention

func (*Role) DeepCopy

func (in *Role) DeepCopy() *Role

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

func (*Role) DeepCopyInto

func (in *Role) DeepCopyInto(out *Role)

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

func (*Role) DeepCopyObject

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

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

func (Role) FullName added in v0.1.0

func (r Role) FullName() string

func (Role) HasStatus

func (r Role) HasStatus(st fmt.Stringer) bool

HasStatus is used in tests, should be moved there

func (Role) IsPendingDeletion

func (r Role) IsPendingDeletion() bool

IsPendingDeletion helps us to detect if the resource should be deleted

func (Role) Validate

func (r Role) Validate(cN string) error

Validate returns an error if the Policy is not valid

type RoleList

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

RoleList contains a list of Role

func (*RoleList) DeepCopy

func (in *RoleList) DeepCopy() *RoleList

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

func (*RoleList) DeepCopyInto

func (in *RoleList) DeepCopyInto(out *RoleList)

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

func (*RoleList) DeepCopyObject

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

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

type RoleSpec

type RoleSpec struct {
	ServiceAccountName             string `json:"serviceAccountName"`
	PolicyARN                      string `json:"policyarn,omitempty"`
	RoleARN                        string `json:"rolearn,omitempty"`
	PermissionsBoundariesPolicyArn string `json:"permissionsBoundariesPolicyARN,omitempty"`
}

RoleSpec defines the desired state of Role

func (*RoleSpec) DeepCopy

func (in *RoleSpec) DeepCopy() *RoleSpec

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

func (*RoleSpec) DeepCopyInto

func (in *RoleSpec) DeepCopyInto(out *RoleSpec)

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

func (RoleSpec) Validate

func (spec RoleSpec) Validate() error

Validate returns an error if the RoleSpec is not valid

type RoleStatus

type RoleStatus struct {
	Condition CrCondition `json:"condition"`
	Reason    string      `json:"reason,omitempty"`
}

RoleStatus defines the observed state of Role

func NewRoleStatus added in v0.1.0

func NewRoleStatus(condition CrCondition, reason string) RoleStatus

func (*RoleStatus) DeepCopy

func (in *RoleStatus) DeepCopy() *RoleStatus

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

func (*RoleStatus) DeepCopyInto

func (in *RoleStatus) DeepCopyInto(out *RoleStatus)

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

type StatementSpec

type StatementSpec struct {
	Resource string   `json:"resource"` // ARN of the target aws resource
	Action   []string `json:"action"`   // the list of requested permissions on the aws resource above
}

StatementSpec defines an aws statement (Sid is autogenerated & Effect is always "allow")

func (*StatementSpec) DeepCopy

func (in *StatementSpec) DeepCopy() *StatementSpec

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

func (*StatementSpec) DeepCopyInto

func (in *StatementSpec) DeepCopyInto(out *StatementSpec)

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

func (StatementSpec) IsSame

func (a StatementSpec) IsSame(b StatementSpec) bool

IsSame is used to detect meaningful difference between 2 StatementSpec ie : order of .Action elements is not taken into account

func (StatementSpec) Validate

func (spec StatementSpec) Validate() error

Validate returns an error if the StatementSpec is not valid

Jump to

Keyboard shortcuts

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