Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the github v1 API group +kubebuilder:object:generate=true +groupName=github.as-code.io
Index ¶
- Constants
- Variables
- type ClusterToken
- func (in *ClusterToken) DeepCopy() *ClusterToken
- func (in *ClusterToken) DeepCopyInto(out *ClusterToken)
- func (in *ClusterToken) DeepCopyObject() runtime.Object
- func (t *ClusterToken) GetInstallationID() int64
- func (t *ClusterToken) GetInstallationTokenOptions() *github.InstallationTokenOptions
- func (t *ClusterToken) GetManagedSecret() ManagedSecret
- func (t *ClusterToken) GetName() string
- func (t *ClusterToken) GetRefreshInterval() time.Duration
- func (t *ClusterToken) GetRetryInterval() time.Duration
- func (t *ClusterToken) GetSecretAnnotations() map[string]string
- func (t *ClusterToken) GetSecretBasicAuth() bool
- func (t *ClusterToken) GetSecretLabels() map[string]string
- func (t *ClusterToken) GetSecretName() string
- func (t *ClusterToken) GetSecretNamespace() string
- func (t *ClusterToken) GetStatusConditions() []metav1.Condition
- func (t *ClusterToken) GetStatusTimestamps() (createdAt, expiresAt time.Time)
- func (t *ClusterToken) GetType() string
- func (t *ClusterToken) SetStatusCondition(condition metav1.Condition) (changed bool)
- func (t *ClusterToken) SetStatusTimestamps(expiresAt time.Time)
- func (t *ClusterToken) UpdateManagedSecret() (changed bool)
- type ClusterTokenList
- type ClusterTokenSecretSpec
- type ClusterTokenSpec
- type ClusterTokenStatus
- type InstallationAccessToken
- type ManagedSecret
- type Permissions
- type Token
- func (in *Token) DeepCopy() *Token
- func (in *Token) DeepCopyInto(out *Token)
- func (in *Token) DeepCopyObject() runtime.Object
- func (t *Token) GetInstallationID() int64
- func (t *Token) GetInstallationTokenOptions() *github.InstallationTokenOptions
- func (t *Token) GetManagedSecret() ManagedSecret
- func (t *Token) GetName() string
- func (t *Token) GetRefreshInterval() time.Duration
- func (t *Token) GetRetryInterval() time.Duration
- func (t *Token) GetSecretAnnotations() map[string]string
- func (t *Token) GetSecretBasicAuth() bool
- func (t *Token) GetSecretLabels() map[string]string
- func (t *Token) GetSecretName() string
- func (t *Token) GetSecretNamespace() string
- func (t *Token) GetStatusConditions() []metav1.Condition
- func (t *Token) GetStatusTimestamps() (createdAt, expiresAt time.Time)
- func (t *Token) GetType() string
- func (t *Token) SetStatusCondition(condition metav1.Condition) (changed bool)
- func (t *Token) SetStatusTimestamps(expiresAt time.Time)
- func (t *Token) UpdateManagedSecret() (changed bool)
- type TokenList
- type TokenSecretSpec
- type TokenSpec
- type TokenStatus
Constants ¶
const (
// ConditionTypeReady is used to signal whether a reconciliation has completed successfully.
ConditionTypeReady = "Ready"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "github.as-code.io", 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 ClusterToken ¶
type ClusterToken struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterTokenSpec `json:"spec,omitempty"` Status ClusterTokenStatus `json:"status,omitempty"` }
ClusterToken is the Schema for the clustertokens API
func (*ClusterToken) DeepCopy ¶
func (in *ClusterToken) DeepCopy() *ClusterToken
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterToken.
func (*ClusterToken) DeepCopyInto ¶
func (in *ClusterToken) DeepCopyInto(out *ClusterToken)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterToken) DeepCopyObject ¶
func (in *ClusterToken) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterToken) GetInstallationID ¶
func (t *ClusterToken) GetInstallationID() int64
func (*ClusterToken) GetInstallationTokenOptions ¶
func (t *ClusterToken) GetInstallationTokenOptions() *github.InstallationTokenOptions
func (*ClusterToken) GetManagedSecret ¶
func (t *ClusterToken) GetManagedSecret() ManagedSecret
func (*ClusterToken) GetName ¶
func (t *ClusterToken) GetName() string
func (*ClusterToken) GetRefreshInterval ¶
func (t *ClusterToken) GetRefreshInterval() time.Duration
func (*ClusterToken) GetRetryInterval ¶ added in v0.5.0
func (t *ClusterToken) GetRetryInterval() time.Duration
func (*ClusterToken) GetSecretAnnotations ¶
func (t *ClusterToken) GetSecretAnnotations() map[string]string
func (*ClusterToken) GetSecretBasicAuth ¶
func (t *ClusterToken) GetSecretBasicAuth() bool
func (*ClusterToken) GetSecretLabels ¶
func (t *ClusterToken) GetSecretLabels() map[string]string
func (*ClusterToken) GetSecretName ¶
func (t *ClusterToken) GetSecretName() string
GetSecretName returns the name of the Secret for the Token
func (*ClusterToken) GetSecretNamespace ¶
func (t *ClusterToken) GetSecretNamespace() string
func (*ClusterToken) GetStatusConditions ¶
func (t *ClusterToken) GetStatusConditions() []metav1.Condition
func (*ClusterToken) GetStatusTimestamps ¶
func (t *ClusterToken) GetStatusTimestamps() (createdAt, expiresAt time.Time)
func (*ClusterToken) GetType ¶
func (t *ClusterToken) GetType() string
func (*ClusterToken) SetStatusCondition ¶
func (t *ClusterToken) SetStatusCondition(condition metav1.Condition) (changed bool)
func (*ClusterToken) SetStatusTimestamps ¶
func (t *ClusterToken) SetStatusTimestamps(expiresAt time.Time)
func (*ClusterToken) UpdateManagedSecret ¶
func (t *ClusterToken) UpdateManagedSecret() (changed bool)
type ClusterTokenList ¶
type ClusterTokenList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []ClusterToken `json:"items"` }
ClusterTokenList contains a list of ClusterToken
func (*ClusterTokenList) DeepCopy ¶
func (in *ClusterTokenList) DeepCopy() *ClusterTokenList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTokenList.
func (*ClusterTokenList) DeepCopyInto ¶
func (in *ClusterTokenList) DeepCopyInto(out *ClusterTokenList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterTokenList) DeepCopyObject ¶
func (in *ClusterTokenList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterTokenSecretSpec ¶
type ClusterTokenSecretSpec struct { // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength:=253 // +kubebuilder:example:="default" // Namespace for the Secret managed by this ClusterToken Namespace string `json:"namespace"` // +optional // +kubebuilder:validation:MaxLength:=253 // Name for the Secret managed by this ClusterToken (defaults to the name of the ClusterToken) Name string `json:"name,omitempty"` // +optional // Extra labels for the Secret managed by this Token Labels map[string]string `json:"labels,omitempty"` // +optional // Extra annotations for the Secret managed by this Token Annotations map[string]string `json:"annotations,omitempty"` // +optional // Create a secret with 'username' and 'password' fields for HTTP Basic Auth rather than simply 'token' BasicAuth bool `json:"basicAuth,omitempty"` }
func (*ClusterTokenSecretSpec) DeepCopy ¶
func (in *ClusterTokenSecretSpec) DeepCopy() *ClusterTokenSecretSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTokenSecretSpec.
func (*ClusterTokenSecretSpec) DeepCopyInto ¶
func (in *ClusterTokenSecretSpec) DeepCopyInto(out *ClusterTokenSecretSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterTokenSpec ¶
type ClusterTokenSpec struct { // +kubebuilder:validation:Required Secret ClusterTokenSecretSpec `json:"secret"` // +optional // +kubebuilder:example:="123456789" // Specify or override the InstallationID of the GitHub App for this Token InstallationID int64 `json:"installationID,omitempty"` // +optional // +kubebuilder:validation:Format:=duration // +kubebuilder:default:="30m" // +kubebuilder:example:="45m" // Specify how often to refresh the token (maximum: 1h) RefreshInterval metav1.Duration `json:"refreshInterval"` // +optional // +kubebuilder:validation:Format:=duration // +kubebuilder:default:="5m" // +kubebuilder:example:="1m" // Specify how long to wait before retrying on transient token retrieval error RetryInterval metav1.Duration `json:"retryInterval"` // +optional // +kubebuilder:example:={"metadata": "read", "contents": "read"} // Specify the permissions for the token as a subset of those of the GitHub App Permissions *Permissions `json:"permissions,omitempty"` // +optional // +kubebuilder:validation:MaxItems:=500 // Specify the repositories for which the token should have access Repositories []string `json:"repositories,omitempty"` // +optional // +kubebuilder:validation:MaxItems:=500 // Specify the repository IDs for which the token should have access RepositoryIDs []int64 `json:"repositoryIDs,omitempty"` }
ClusterTokenSpec defines the desired state of ClusterToken
func (*ClusterTokenSpec) DeepCopy ¶
func (in *ClusterTokenSpec) DeepCopy() *ClusterTokenSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTokenSpec.
func (*ClusterTokenSpec) DeepCopyInto ¶
func (in *ClusterTokenSpec) DeepCopyInto(out *ClusterTokenSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterTokenStatus ¶
type ClusterTokenStatus struct { ManagedSecret ManagedSecret `json:"managedSecret,omitempty"` IAT InstallationAccessToken `json:"installationAccessToken,omitempty"` Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` }
ClusterTokenStatus defines the observed state of ClusterToken
func (*ClusterTokenStatus) DeepCopy ¶
func (in *ClusterTokenStatus) DeepCopy() *ClusterTokenStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTokenStatus.
func (*ClusterTokenStatus) DeepCopyInto ¶
func (in *ClusterTokenStatus) DeepCopyInto(out *ClusterTokenStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InstallationAccessToken ¶
type InstallationAccessToken struct { CreatedAt metav1.Time `json:"updatedAt,omitempty"` ExpiresAt metav1.Time `json:"expiresAt,omitempty"` }
func (*InstallationAccessToken) DeepCopy ¶
func (in *InstallationAccessToken) DeepCopy() *InstallationAccessToken
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstallationAccessToken.
func (*InstallationAccessToken) DeepCopyInto ¶
func (in *InstallationAccessToken) DeepCopyInto(out *InstallationAccessToken)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManagedSecret ¶
type ManagedSecret struct { BasicAuth bool `json:"basicAuth"` Namespace string `json:"namespace,omitempty"` Name string `json:"name,omitempty"` }
func (*ManagedSecret) DeepCopy ¶
func (in *ManagedSecret) DeepCopy() *ManagedSecret
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedSecret.
func (*ManagedSecret) DeepCopyInto ¶
func (in *ManagedSecret) DeepCopyInto(out *ManagedSecret)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ManagedSecret) IsUnset ¶
func (m ManagedSecret) IsUnset() bool
func (ManagedSecret) Key ¶
func (m ManagedSecret) Key() types.NamespacedName
func (ManagedSecret) MatchesSpec ¶
func (m ManagedSecret) MatchesSpec(owner secretOwner) bool
type Permissions ¶
type Permissions struct { // +optional // +kubebuilder:validation:Enum:=read;write Actions *string `json:"actions,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Administration *string `json:"administration,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Checks *string `json:"checks,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Codespaces *string `json:"codespaces,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Contents *string `json:"contents,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write DependabotSecrets *string `json:"dependabot_secrets,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Deployments *string `json:"deployments,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write EmailAddresses *string `json:"email_addresses,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Environments *string `json:"environments,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Followers *string `json:"followers,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Issues *string `json:"issues,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Metadata *string `json:"metadata,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Members *string `json:"members,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write OrganizationAdministration *string `json:"organization_administration,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write OrganizationCustomRoles *string `json:"organization_custom_roles,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write OrganizationHooks *string `json:"organization_hooks,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write OrganizationPackages *string `json:"organization_packages,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write OrganizationPlan *string `json:"organization_plan,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write OrganizationProjects *string `json:"organization_projects,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write OrganizationSecrets *string `json:"organization_secrets,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write OrganizationSelfHostedRunners *string `json:"organization_self_hosted_runners,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write OrganizationUserBlocking *string `json:"organization_user_blocking,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Packages *string `json:"packages,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Pages *string `json:"pages,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write PullRequests *string `json:"pull_requests,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write RepositoryCustomProperties *string `json:"repository_custom_properties,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write RepositoryHooks *string `json:"repository_hooks,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write;admin RepositoryProjects *string `json:"repository_projects,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Secrets *string `json:"secrets,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write SecretScanningAlerts *string `json:"secret_scanning_alerts,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write SecurityEvents *string `json:"security_events,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write SingleFile *string `json:"single_file,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write Statuses *string `json:"statuses,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write TeamDiscussions *string `json:"team_discussions,omitempty"` // +optional // +kubebuilder:validation:Enum:=read;write VulnerabilityAlerts *string `json:"vulnerability_alerts,omitempty"` // +optional // +kubebuilder:validation:Enum:=write Workflows *string `json:"workflows,omitempty"` }
func (*Permissions) DeepCopy ¶
func (in *Permissions) DeepCopy() *Permissions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Permissions.
func (*Permissions) DeepCopyInto ¶
func (in *Permissions) DeepCopyInto(out *Permissions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Permissions) ToInstallationPermissions ¶
func (p *Permissions) ToInstallationPermissions() *github.InstallationPermissions
type Token ¶
type Token struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TokenSpec `json:"spec,omitempty"` Status TokenStatus `json:"status,omitempty"` }
Token is the Schema for the Tokens API
func (*Token) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Token.
func (*Token) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Token) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Token) GetInstallationID ¶
func (*Token) GetInstallationTokenOptions ¶
func (t *Token) GetInstallationTokenOptions() *github.InstallationTokenOptions
func (*Token) GetManagedSecret ¶
func (t *Token) GetManagedSecret() ManagedSecret
func (*Token) GetRefreshInterval ¶
func (*Token) GetRetryInterval ¶ added in v0.5.0
func (*Token) GetSecretAnnotations ¶
func (*Token) GetSecretBasicAuth ¶
func (*Token) GetSecretLabels ¶
func (*Token) GetSecretName ¶
GetSecretName returns the name of the Secret for the Token
func (*Token) GetSecretNamespace ¶
func (*Token) GetStatusConditions ¶
func (*Token) GetStatusTimestamps ¶
func (*Token) SetStatusCondition ¶
func (*Token) SetStatusTimestamps ¶
func (*Token) UpdateManagedSecret ¶
type TokenList ¶
type TokenList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Token `json:"items"` }
TokenList contains a list of Token
func (*TokenList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenList.
func (*TokenList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TokenList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TokenSecretSpec ¶
type TokenSecretSpec struct { // +optional // +kubebuilder:validation:MaxLength:=253 // Name for the Secret managed by this Token (defaults to the name of the Token) Name string `json:"name,omitempty"` // +optional // Extra labels for the Secret managed by this Token Labels map[string]string `json:"labels,omitempty"` // +optional // Extra annotations for the Secret managed by this Token Annotations map[string]string `json:"annotations,omitempty"` // +optional // Create a secret with 'username' and 'password' fields for HTTP Basic Auth rather than simply 'token' BasicAuth bool `json:"basicAuth,omitempty"` }
func (*TokenSecretSpec) DeepCopy ¶
func (in *TokenSecretSpec) DeepCopy() *TokenSecretSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenSecretSpec.
func (*TokenSecretSpec) DeepCopyInto ¶
func (in *TokenSecretSpec) DeepCopyInto(out *TokenSecretSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TokenSpec ¶
type TokenSpec struct { // +optional // Override the default token secret name and type Secret TokenSecretSpec `json:"secret,omitempty"` // +optional // +kubebuilder:example:="123456789" // Specify or override the InstallationID of the GitHub App for this Token InstallationID int64 `json:"installationID,omitempty"` // +optional // +kubebuilder:validation:Format:=duration // +kubebuilder:default:="30m" // +kubebuilder:example:="45m" // Specify how often to refresh the token (maximum: 1h) RefreshInterval metav1.Duration `json:"refreshInterval"` // +optional // +kubebuilder:validation:Format:=duration // +kubebuilder:default:="5m" // +kubebuilder:example:="1m" // Specify how long to wait before retrying on transient token retrieval error RetryInterval metav1.Duration `json:"retryInterval"` // +optional // +kubebuilder:example:={"metadata": "read", "contents": "read"} // Specify the permissions for the token as a subset of those of the GitHub App Permissions *Permissions `json:"permissions,omitempty"` // +optional // +kubebuilder:validation:MaxItems:=500 // Specify the repositories for which the token should have access Repositories []string `json:"repositories,omitempty"` // +optional // +kubebuilder:validation:MaxItems:=500 // Specify the repository IDs for which the token should have access RepositoryIDs []int64 `json:"repositoryIDs,omitempty"` }
TokenSpec defines the desired state of Token
func (*TokenSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenSpec.
func (*TokenSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TokenStatus ¶
type TokenStatus struct { // Important: Run "make" to regenerate code after modifying this file ManagedSecret ManagedSecret `json:"managedSecret,omitempty"` IAT InstallationAccessToken `json:"installationAccessToken,omitempty"` Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` }
TokenStatus defines the observed state of Token
func (*TokenStatus) DeepCopy ¶
func (in *TokenStatus) DeepCopy() *TokenStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenStatus.
func (*TokenStatus) DeepCopyInto ¶
func (in *TokenStatus) DeepCopyInto(out *TokenStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.