Skip to content

Commit

Permalink
rename SidecarConfiguration to FeatureFlagSource
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <[email protected]>
  • Loading branch information
odubajDT committed Nov 2, 2023
1 parent 5da4c85 commit b188fe6
Show file tree
Hide file tree
Showing 15 changed files with 485 additions and 182 deletions.
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ resources:
namespaced: true
domain: openfeature.dev
group: core
kind: SidecarConfiguration
kind: FeatureFlagSource
path: github.com/open-feature/open-feature-operator/apis/core/v1beta1
version: v1beta1
version: "3"
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// SidecarConfigurationSpec defines the desired state of SidecarConfiguration
type SidecarConfigurationSpec struct {
// FeatureFlagSourceSpec defines the desired state of FeatureFlagSource
type FeatureFlagSourceSpec struct {
// MetricsPort defines the port to serve metrics on, defaults to 8014
// +optional
MetricsPort int32 `json:"metricsPort"`
Expand Down Expand Up @@ -123,34 +123,34 @@ type Source struct {
Selector string `json:"selector,omitempty"`
}

// SidecarConfigurationStatus defines the observed state of SidecarConfiguration
type SidecarConfigurationStatus struct {
// FeatureFlagSourceStatus defines the observed state of FeatureFlagSource
type FeatureFlagSourceStatus struct {
}

//+kubebuilder:resource:shortName="sc"
//+kubebuilder:resource:shortName="ffs"
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// SidecarConfiguration is the Schema for the sidecarconfigurations API
type SidecarConfiguration struct {
// FeatureFlagSource is the Schema for the FeatureFlagSources API
type FeatureFlagSource struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec SidecarConfigurationSpec `json:"spec,omitempty"`
Status SidecarConfigurationStatus `json:"status,omitempty"`
Spec FeatureFlagSourceSpec `json:"spec,omitempty"`
Status FeatureFlagSourceStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// SidecarConfigurationList contains a list of SidecarConfiguration
type SidecarConfigurationList struct {
// FeatureFlagSourceList contains a list of FeatureFlagSource
type FeatureFlagSourceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []SidecarConfiguration `json:"items"`
Items []FeatureFlagSource `json:"items"`
}

func init() {
SchemeBuilder.Register(&SidecarConfiguration{}, &SidecarConfigurationList{})
SchemeBuilder.Register(&FeatureFlagSource{}, &FeatureFlagSourceList{})
}

func (s SyncProviderType) IsKubernetes() bool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/require"
)

func Test_FLagSourceConfiguration_SyncProvider(t *testing.T) {
func Test_FeatureFlagSource_SyncProvider(t *testing.T) {
k := SyncProviderKubernetes
f := SyncProviderFilepath
h := SyncProviderHttp
Expand Down
204 changes: 102 additions & 102 deletions apis/core/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b188fe6

Please sign in to comment.