Skip to content

CNF-13731: Add HTTP01ChallengeProxy types (PoC) #2318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -819,12 +819,20 @@ var (
enhancementPR("https://github.com/openshift/enhancements/pull/1779").
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()

FeatureGateAWSDedicatedHosts = newFeatureGate("AWSDedicatedHosts").
reportProblemsToJiraComponent("Installer").
contactPerson("faermanj").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1781").
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()

FeatureGateHTTP01ChallengeProxy = newFeatureGate("HTTP01ChallengeProxy").
reportProblemsToJiraComponent("Networking/ingress").
contactPerson("sebrandon1").
productScope(ocpSpecific).
enhancementPR("github.com/testing/in/progress").
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()
)
74 changes: 74 additions & 0 deletions network/v1alpha1/types_http01challengeproxy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:path=http01challengeproxies,scope=Namespaced
// +openshift:api-approved.openshift.io=true
// +openshift:file-pattern=cvoRunLevel=0000_70,operatorName=network,operatorOrdering=00
// +openshift:compatibility-gen:level=4
// +openshift:enable:FeatureGate=HTTP01ChallengeProxy

// HTTP01ChallengeProxy is the schema for the HTTP01ChallengeProxy API.
type HTTP01ChallengeProxy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

// Spec is the specification of the desired behavior of the HTTP01ChallengeProxy.
// +required
Spec HTTP01ChallengeProxySpec `json:"spec"`
// Status is the most recently observed status of the HTTP01ChallengeProxy.
// +optional
Status HTTP01ChallengeProxyStatus `json:"status,omitempty"`
}

// HTTP01ChallengeProxySpec is a desired state description of HTTP01ChallengeProxy.
type HTTP01ChallengeProxySpec struct {
}

// HTTP01ChallengeProxyStatus defines the observed status of HTTP01ChallengeProxy.
type HTTP01ChallengeProxyStatus struct {
// Conditions is a list of conditions and their status.
// +listType=map
// +listMapKey=type
Conditions []HTTP01ChallengeProxyCondition `json:"conditions"`
}

// HTTP01ChallengeProxyCondition describes the state of the HTTP01ChallengeProxy.
type HTTP01ChallengeProxyCondition struct {
// Type is the type of the condition.
// +required
Type string `json:"type"`
// Status is the status of the condition.
// +required
Status metav1.ConditionStatus `json:"status"`
// LastTransitionTime is the time of the last transition of the condition.
// +required
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
// Reason is the reason for the condition's last transition.
// +required
Reason string `json:"reason"`
// Message is a human-readable message indicating details about the last transition.
// +required
Message string `json:"message"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// HTTP01ChallengeProxyList contains a list of HTTP01ChallengeProxy.
type HTTP01ChallengeProxyList struct {
metav1.TypeMeta `json:",inline"`

// metadata is the standard list metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
metav1.ListMeta `json:"metadata,omitempty"`

// items is a list of HTTP01ChallengeProxy.
// +listType=map
Items []HTTP01ChallengeProxy `json:"items"`
}