|
| 1 | +package v1alpha1 |
| 2 | + |
| 3 | +import ( |
| 4 | + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 5 | +) |
| 6 | + |
| 7 | +// +genclient |
| 8 | +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object |
| 9 | +// +kubebuilder:object:root=true |
| 10 | +// +kubebuilder:subresource:status |
| 11 | +// +kubebuilder:resource:path=http01challengeproxies,scope=Namespaced |
| 12 | +// +openshift:api-approved.openshift.io=true |
| 13 | +// +openshift:file-pattern=cvoRunLevel=0000_70,operatorName=network,operatorOrdering=00 |
| 14 | +// +openshift:compatibility-gen:level=4 |
| 15 | +// +openshift:enable:FeatureGate=HTTP01ChallengeProxy |
| 16 | + |
| 17 | +// HTTP01ChallengeProxy is the schema for the HTTP01ChallengeProxy API. |
| 18 | +type HTTP01ChallengeProxy struct { |
| 19 | + metav1.TypeMeta `json:",inline"` |
| 20 | + metav1.ObjectMeta `json:"metadata,omitempty"` |
| 21 | + |
| 22 | + // Spec is the specification of the desired behavior of the HTTP01ChallengeProxy. |
| 23 | + // +required |
| 24 | + Spec HTTP01ChallengeProxySpec `json:"spec"` |
| 25 | + // Status is the most recently observed status of the HTTP01ChallengeProxy. |
| 26 | + // +optional |
| 27 | + Status HTTP01ChallengeProxyStatus `json:"status,omitempty"` |
| 28 | +} |
| 29 | + |
| 30 | +// HTTP01ChallengeProxySpec is a desired state description of HTTP01ChallengeProxy. |
| 31 | +type HTTP01ChallengeProxySpec struct { |
| 32 | + // Domain is the domain name for which the HTTP01ChallengeProxy will be used. |
| 33 | + // +required |
| 34 | + Domain string `json:"domain"` |
| 35 | + // Service is the service name that will be used to proxy the HTTP01 challenge. |
| 36 | + // +required |
| 37 | + Service string `json:"service"` |
| 38 | +} |
| 39 | + |
| 40 | +// HTTP01ChallengeProxyStatus defines the observed status of HTTP01ChallengeProxy. |
| 41 | +type HTTP01ChallengeProxyStatus struct { |
| 42 | + // Conditions is a list of conditions and their status. |
| 43 | + // +listType=map |
| 44 | + // +listMapKey=type |
| 45 | + Conditions []HTTP01ChallengeProxyCondition `json:"conditions"` |
| 46 | +} |
| 47 | + |
| 48 | +// HTTP01ChallengeProxyCondition describes the state of the HTTP01ChallengeProxy. |
| 49 | +type HTTP01ChallengeProxyCondition struct { |
| 50 | + // Type is the type of the condition. |
| 51 | + // +required |
| 52 | + Type string `json:"type"` |
| 53 | + // Status is the status of the condition. |
| 54 | + // +required |
| 55 | + Status metav1.ConditionStatus `json:"status"` |
| 56 | + // LastTransitionTime is the time of the last transition of the condition. |
| 57 | + // +required |
| 58 | + LastTransitionTime metav1.Time `json:"lastTransitionTime"` |
| 59 | + // Reason is the reason for the condition's last transition. |
| 60 | + // +required |
| 61 | + Reason string `json:"reason"` |
| 62 | + // Message is a human-readable message indicating details about the last transition. |
| 63 | + // +required |
| 64 | + Message string `json:"message"` |
| 65 | +} |
| 66 | + |
| 67 | +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object |
| 68 | + |
| 69 | +// HTTP01ChallengeProxyList contains a list of HTTP01ChallengeProxy. |
| 70 | +type HTTP01ChallengeProxyList struct { |
| 71 | + metav1.TypeMeta `json:",inline"` |
| 72 | + |
| 73 | + // metadata is the standard list metadata. |
| 74 | + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
| 75 | + metav1.ListMeta `json:"metadata,omitempty"` |
| 76 | + |
| 77 | + // items is a list of HTTP01ChallengeProxy. |
| 78 | + // +listType=map |
| 79 | + Items []HTTP01ChallengeProxy `json:"items"` |
| 80 | +} |
0 commit comments