Skip to content

Commit

Permalink
Merge pull request #196 from kukacz/publish-pkg-fluxcd-notification-c…
Browse files Browse the repository at this point in the history
…ontroller

Publish module fluxcd-notification-controller
  • Loading branch information
Peefy authored Aug 2, 2024
2 parents d8c1d5b + fb6d008 commit 62c5a2f
Show file tree
Hide file tree
Showing 13 changed files with 4,462 additions and 0 deletions.
679 changes: 679 additions & 0 deletions fluxcd-notification-controller/README.md

Large diffs are not rendered by default.

1,878 changes: 1,878 additions & 0 deletions fluxcd-notification-controller/crds/[email protected]

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions fluxcd-notification-controller/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "fluxcd-notification-controller"
edition = "v0.9.0"
version = "v1.3.0"

[dependencies]
k8s = "1.30"

5 changes: 5 additions & 0 deletions fluxcd-notification-controller/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.30"
version = "1.30"
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
"""
This file was generated by the KCL auto-gen tool. DO NOT EDIT.
Editing this file might prove futile when you re-run the KCL auto-gen generate command.
"""
import regex
import k8s.apimachinery.pkg.apis.meta.v1
_regex_match = regex.match


schema Receiver:
"""
Receiver is the Schema for the receivers API.

Attributes
----------
apiVersion : str, default is "notification.toolkit.fluxcd.io/v1", required
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
kind : str, default is "Receiver", required
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
metadata : v1.ObjectMeta, default is Undefined, optional
metadata
spec : NotificationToolkitFluxcdIoV1ReceiverSpec, default is Undefined, optional
spec
status : NotificationToolkitFluxcdIoV1ReceiverStatus, default is Undefined, optional
status
"""


apiVersion: "notification.toolkit.fluxcd.io/v1" = "notification.toolkit.fluxcd.io/v1"

kind: "Receiver" = "Receiver"

metadata?: v1.ObjectMeta

spec?: NotificationToolkitFluxcdIoV1ReceiverSpec

status?: NotificationToolkitFluxcdIoV1ReceiverStatus


schema NotificationToolkitFluxcdIoV1ReceiverSpec:
"""
ReceiverSpec defines the desired state of the Receiver.

Attributes
----------
events : [str], default is Undefined, optional
Events specifies the list of event types to handle,
e.g. 'push' for GitHub or 'Push Hook' for GitLab.
interval : str, default is "10m", optional
Interval at which to reconcile the Receiver with its Secret references.
resources : [NotificationToolkitFluxcdIoV1ReceiverSpecResourcesItems0], default is Undefined, required
A list of resources to be notified about changes.
secretRef : NotificationToolkitFluxcdIoV1ReceiverSpecSecretRef, default is Undefined, required
secret ref
suspend : bool, default is Undefined, optional
Suspend tells the controller to suspend subsequent
events handling for this receiver.
$type : str, default is Undefined, required
Type of webhook sender, used to determine
the validation procedure and payload deserialization.
"""


events?: [str]

interval?: str = "10m"

resources: [NotificationToolkitFluxcdIoV1ReceiverSpecResourcesItems0]

secretRef: NotificationToolkitFluxcdIoV1ReceiverSpecSecretRef

suspend?: bool

$type: "generic" | "generic-hmac" | "github" | "gitlab" | "bitbucket" | "harbor" | "dockerhub" | "quay" | "gcr" | "nexus" | "acr" | "cdevents"


check:
_regex_match(str(interval), r"^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$") if interval


schema NotificationToolkitFluxcdIoV1ReceiverSpecResourcesItems0:
"""
CrossNamespaceObjectReference contains enough information to let you locate the
typed referenced object at cluster level

Attributes
----------
apiVersion : str, default is Undefined, optional
API version of the referent
kind : str, default is Undefined, required
Kind of the referent
matchLabels : {str:str}, default is Undefined, optional
MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
MatchLabels requires the name to be set to `*`.
name : str, default is Undefined, required
Name of the referent
If multiple resources are targeted `*` may be set.
namespace : str, default is Undefined, optional
Namespace of the referent
"""


apiVersion?: str

kind: "Bucket" | "GitRepository" | "Kustomization" | "HelmRelease" | "HelmChart" | "HelmRepository" | "ImageRepository" | "ImagePolicy" | "ImageUpdateAutomation" | "OCIRepository"

matchLabels?: {str:str}

name: str

namespace?: str


check:
len(name) <= 53
len(name) >= 1
len(namespace) <= 53 if namespace
len(namespace) >= 1 if namespace


schema NotificationToolkitFluxcdIoV1ReceiverSpecSecretRef:
"""
SecretRef specifies the Secret containing the token used
to validate the payload authenticity.

Attributes
----------
name : str, default is Undefined, required
Name of the referent.
"""


name: str


schema NotificationToolkitFluxcdIoV1ReceiverStatus:
"""
ReceiverStatus defines the observed state of the Receiver.

Attributes
----------
conditions : [NotificationToolkitFluxcdIoV1ReceiverStatusConditionsItems0], default is Undefined, optional
Conditions holds the conditions for the Receiver.
lastHandledReconcileAt : str, default is Undefined, optional
LastHandledReconcileAt holds the value of the most recent
reconcile request value, so a change of the annotation value
can be detected.
observedGeneration : int, default is Undefined, optional
ObservedGeneration is the last observed generation of the Receiver object.
webhookPath : str, default is Undefined, optional
WebhookPath is the generated incoming webhook address in the format
of '/hook/sha256sum(token+name+namespace)'.
"""


conditions?: [NotificationToolkitFluxcdIoV1ReceiverStatusConditionsItems0]

lastHandledReconcileAt?: str

observedGeneration?: int

webhookPath?: str


schema NotificationToolkitFluxcdIoV1ReceiverStatusConditionsItems0:
"""
Condition contains details for one aspect of the current state of this API Resource.
---
This struct is intended for direct use as an array at the field path .status.conditions. For example,


type FooStatus struct{
// Represents the observations of a foo's current state.
// Known .status.conditions.type are: "Available", "Progressing", and "Degraded"
// +patchMergeKey=type
// +patchStrategy=merge
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`


// other fields
}

Attributes
----------
lastTransitionTime : str, default is Undefined, required
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
message : str, default is Undefined, required
message is a human readable message indicating details about the transition.
This may be an empty string.
observedGeneration : int, default is Undefined, optional
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
reason : str, default is Undefined, required
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
status : str, default is Undefined, required
status of the condition, one of True, False, Unknown.
$type : str, default is Undefined, required
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
"""


lastTransitionTime: str

message: str

observedGeneration?: int

reason: str

status: "True" | "False" | "Unknown"

$type: str


check:
len(message) <= 32768
observedGeneration >= 0 if observedGeneration not in [None, Undefined]
len(reason) <= 1024
len(reason) >= 1
_regex_match(str(reason), r"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$")
len($type) <= 316
_regex_match(str($type), r"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$")


Loading

0 comments on commit 62c5a2f

Please sign in to comment.