Skip to content

Commit

Permalink
Revert "Add service metadata endpoints (#69)" (#72)
Browse files Browse the repository at this point in the history
This reverts commit 861f831.
  • Loading branch information
aalexandru committed Aug 28, 2023
1 parent 8a0f501 commit 3b4c45e
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 806 deletions.
9 changes: 0 additions & 9 deletions config/crd/bases/registry.ethos.adobe.com_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,6 @@ spec:
registeredAt:
description: Timestamp when cluster was registered in Cluster Registry
type: string
services:
additionalProperties:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
description: ServiceMetadata service specific metadata
type: object
shortName:
description: Cluster name, without dash
maxLength: 64
Expand Down
33 changes: 4 additions & 29 deletions local/database/dummy-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,30 +96,18 @@
tags:
onboarding: "off"
scaling: "off"
services:
12345:
ns-team-abc:
key1: value1
key2: value2
ns-team-xyz:
key3: value3
98765:
ns-team-example:
some.key: some.value
ns-team-example2:
foo: bar
- apiVersion: registry.ethos.adobe.com/v1
kind: Cluster
metadata:
name: cluster02-prod-euwest1
name: cluster02-prod-euwest1
namespace: cluster-registry
spec:
name: cluster02-prod-euwest1
shortName: cluster02prodeuwest1
name: cluster02-prod-euwest1
shortName: cluster02prodeuwest1
apiServer:
endpoint: https://cluster02-prod-euwest1.example.com
certificateAuthorityData: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0==
region: euwest1
region: euwest1
cloudType: azure
cloudProviderRegion: euwest1
environment: Prod
Expand Down Expand Up @@ -183,19 +171,6 @@
tags:
onboarding: "off"
scaling: "on"
services:
12345:
ns-team-abc:
keyA: valueA
keyB: valueB
55555:
ns-team-foo:
foo: bar
98765:
ns-team-example:
some.other.key: some.other.value
ns-team-foobar:
foo: bar
- apiVersion: registry.ethos.adobe.com/v1
kind: Cluster
metadata:
Expand Down
6 changes: 3 additions & 3 deletions local/database/reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ set -o pipefail
ROOT_DIR="$(cd "$(dirname "$0")/.."; pwd)"

echo 'Loading local environment variables...'
source ${ROOT_DIR}/.env.local
source ${ROOT_DIR}/local/.env.local

echo 'Create dynamodb schema...'
aws dynamodb delete-table --table-name ${DB_TABLE_NAME} --endpoint-url $DB_ENDPOINT > /dev/null 2>&1 || true
aws dynamodb create-table --cli-input-json file://${ROOT_DIR}/database/schema.json --endpoint-url $DB_ENDPOINT > /dev/null
aws dynamodb create-table --cli-input-json file://${ROOT_DIR}/local/db/schema.json --endpoint-url $DB_ENDPOINT > /dev/null

echo 'Populate database with dummy data..'
go run ${ROOT_DIR}/database/import.go --input-file ${ROOT_DIR}/database/dummy-data.yaml
go run ${ROOT_DIR}/local/db/import.go --input-file ${ROOT_DIR}/local/db/dummy-data.yaml
9 changes: 0 additions & 9 deletions pkg/api/registry/v1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ type ClusterSpec struct {

// Capacity cluster information
Capacity Capacity `json:"capacity,omitempty"`

// ServiceMetadata service specific metadata
ServiceMetadata ServiceMetadata `json:"services,omitempty"`
}

// Offering the cluster is meant for
Expand Down Expand Up @@ -259,12 +256,6 @@ type Capacity struct {
ClusterProvisioning int `json:"clusterProvisioning"`
}

type ServiceMetadata map[string]ServiceMetadataItem

type ServiceMetadataItem map[string]ServiceMetadataMap

type ServiceMetadataMap map[string]string

// ClusterStatus defines the observed state of Cluster
type ClusterStatus struct {
// Send/Receive Errors
Expand Down
145 changes: 5 additions & 140 deletions pkg/api/registry/v1/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 3b4c45e

Please sign in to comment.