-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
write infrastructure state during create
- Loading branch information
Showing
11 changed files
with
129 additions
and
32 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
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,8 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "state", | ||
srcs = ["state.go"], | ||
importpath = "github.com/edgelesssys/constellation/v2/cli/internal/state", | ||
visibility = ["//cli:__subpackages__"], | ||
) |
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,41 @@ | ||
/* | ||
Copyright (c) Edgeless Systems GmbH | ||
SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
|
||
// package state defines the structure of the Constellation state file. | ||
package state | ||
|
||
// State describe the entire state to describe a Constellation cluster. | ||
type State struct { | ||
Version string `yaml:"version"` | ||
Infrastructure `yaml:"infrastructure"` | ||
} | ||
|
||
// Infrastructure describe the state related to the cloud resources of the cluster. | ||
type Infrastructure struct { | ||
UID string `yaml:"uid"` | ||
PublicIP string `yaml:"publicIP"` | ||
InitSecret string `yaml:"initSecret"` | ||
APIServerCertSANs []string `yaml:"apiServerCertSANs"` | ||
Azure AzureState `yaml:"azure"` | ||
GCP GCPState `yaml:"gcp"` | ||
} | ||
|
||
// GCPState describes the infra state related to GCP. | ||
type GCPState struct { | ||
ProjectID string `yaml:"projectID"` | ||
IPCidrNode string `yaml:"ipCidrNode"` | ||
IPCidrPod string `yaml:"ipCidrPod"` | ||
} | ||
|
||
// AzureState describes the infra state related to Azure. | ||
type AzureState struct { | ||
ResourceGroup string `yaml:"resourceGroup"` | ||
SubscriptionID string `yaml:"subscriptionID"` | ||
NetworkSecurityGroupName string `yaml:"networkSecurityGroupName"` | ||
LoadBalancerName string `yaml:"loadBalancerName"` | ||
UserAssignedIdentity string `yaml:"userAssignedIdentity"` | ||
AttestationURL string `yaml:"attestationURL"` | ||
} |
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