forked from chaos-mesh/chaos-mesh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a30e2e
commit 729b4f4
Showing
32 changed files
with
1,919 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
var ( | ||
_ InnerObject = (*MoveAZChaos)(nil) | ||
_ InnerObjectWithSelector = (*MoveAZChaos)(nil) | ||
) | ||
|
||
// +kubebuilder:object:root=true | ||
// +chaos-mesh:experiment | ||
type MoveAZChaos struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec MoveAZChaosSpec `json:"spec"` | ||
Status MoveAZChaosStatus `json:"status"` | ||
} | ||
|
||
type MoveAZChaosSpec struct { | ||
DeploymentSelectorSpec `json:"selector"` | ||
Zone string `json:"zone"` | ||
// Duration represents the duration of the chaos | ||
// +optional | ||
Duration *string `json:"duration,omitempty"` | ||
// RemoteCluster represents the remote cluster where the chaos will be deployed | ||
// +optional | ||
RemoteCluster string `json:"remoteCluster,omitempty"` | ||
} | ||
type MoveAZChaosStatus struct { | ||
ChaosStatus `json:",inline"` | ||
} | ||
|
||
func (obj *MoveAZChaos) GetSelectorSpecs() map[string]interface{} { | ||
return map[string]interface{}{ | ||
".": &obj.Spec.DeploymentSelector, | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.