-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow using different charts and/or deploy different Dapr versions #46
Signed-off-by: Luca Burgazzoli <[email protected]>
- Loading branch information
1 parent
9c9cda7
commit be3f791
Showing
94 changed files
with
5,118 additions
and
720 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
Copyright 2023. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// DaprCruiseControlSpec defines the desired state of DaprCruiseControl. | ||
type DaprCruiseControlSpec struct { | ||
} | ||
|
||
// DaprCruiseControlStatus defines the observed state of DaprCruiseControl. | ||
type DaprCruiseControlStatus struct { | ||
Phase string `json:"phase"` | ||
Conditions []metav1.Condition `json:"conditions,omitempty"` | ||
ObservedGeneration int64 `json:"observedGeneration,omitempty"` | ||
Chart *ChartMeta `json:"chart,omitempty"` | ||
} | ||
|
||
// +genclient | ||
// +kubebuilder:object:root=true | ||
// +kubebuilder:subresource:status | ||
// +kubebuilder:storageversion | ||
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The phase" | ||
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status`,description="Ready" | ||
// +kubebuilder:printcolumn:name="Reason",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].reason`,description="Reason" | ||
// +kubebuilder:printcolumn:name="Reconciled",type=string,JSONPath=`.status.conditions[?(@.type=="Reconciled")].status`,description="Ready" | ||
// +kubebuilder:printcolumn:name="Reconciled Reason",type=string,JSONPath=`.status.conditions[?(@.type=="Reconciled")].reason`,description="Reason" | ||
// +kubebuilder:resource:path=daprcruiscontrols,scope=Namespaced,shortName=dcc,categories=dapr | ||
|
||
// DaprCruiseControl is the Schema for the daprcruisecontrols API. | ||
type DaprCruiseControl struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec DaprCruiseControlSpec `json:"spec,omitempty"` | ||
Status DaprCruiseControlStatus `json:"status,omitempty"` | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
|
||
// DaprCruiseControlList contains a list of DaprCruiseControl. | ||
type DaprCruiseControlList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []DaprCruiseControl `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&DaprCruiseControl{}, &DaprCruiseControlList{}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
Copyright 2023. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// DaprInstanceSpec defines the desired state of DaprInstance. | ||
type DaprInstanceSpec struct { | ||
// +kubebuilder:validation:Optional | ||
Chart *ChartSpec `json:"chart,omitempty"` | ||
|
||
// +kubebuilder:validation:Optional | ||
Values *JSON `json:"values"` | ||
} | ||
|
||
// DaprInstanceStatus defines the observed state of DaprInstance. | ||
type DaprInstanceStatus struct { | ||
Phase string `json:"phase"` | ||
Conditions []metav1.Condition `json:"conditions,omitempty"` | ||
ObservedGeneration int64 `json:"observedGeneration,omitempty"` | ||
Chart *ChartMeta `json:"chart,omitempty"` | ||
} | ||
|
||
// +genclient | ||
// +kubebuilder:object:root=true | ||
// +kubebuilder:subresource:status | ||
// +kubebuilder:storageversion | ||
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The phase" | ||
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status`,description="Ready" | ||
// +kubebuilder:printcolumn:name="Reason",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].reason`,description="Reason" | ||
// +kubebuilder:printcolumn:name="Reconciled",type=string,JSONPath=`.status.conditions[?(@.type=="Reconciled")].status`,description="Ready" | ||
// +kubebuilder:printcolumn:name="Reconciled Reason",type=string,JSONPath=`.status.conditions[?(@.type=="Reconciled")].reason`,description="Reason" | ||
// +kubebuilder:resource:path=daprinstances,scope=Namespaced,shortName=di,categories=dapr | ||
|
||
// DaprInstance is the Schema for the daprinstances API. | ||
type DaprInstance struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec DaprInstanceSpec `json:"spec,omitempty"` | ||
Status DaprInstanceStatus `json:"status,omitempty"` | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
|
||
// DaprInstanceList contains a list of DaprInstance. | ||
type DaprInstanceList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []DaprInstance `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&DaprInstance{}, &DaprInstanceList{}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.