Skip to content

Commit

Permalink
Remove unused manifests (#638)
Browse files Browse the repository at this point in the history
* remove unused manifests and scripts

* bump
  • Loading branch information
danielm-codefresh authored Nov 9, 2022
1 parent a5a804e commit a9c1e99
Show file tree
Hide file tree
Showing 28 changed files with 13 additions and 726 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=v0.1.4
VERSION=v0.1.5

OUT_DIR=dist
YEAR?=$(shell date +"%Y")
Expand All @@ -9,7 +9,6 @@ IMAGE_NAMESPACE?=codefresh

RUNTIME_DEF_URL="https://raw.githubusercontent.com/codefresh-io/csdp-official/stable/csdp/hybrid/basic/runtime.yaml"
ADD_CLUSTER_DEF_URL="https://github.com/codefresh-io/csdp-official/add-cluster/kustomize"
FALLBACK_ADD_CLUSTER_DEF_URL="https://github.com/codefresh-io/cli-v2/manifests/add-cluster/kustomize"

# when developing, point this to your local clone of csdp-official
DEV_RUNTIME_DEF_URL="https://raw.githubusercontent.com/codefresh-io/csdp-official/stable/csdp/hybrid/basic/runtime.yaml"
Expand Down Expand Up @@ -106,7 +105,6 @@ $(OUT_DIR)/$(CLI_NAME)-%: $(CLI_SRCS)
GIT_COMMIT=$(GIT_COMMIT) \
RUNTIME_DEF_URL=$(RUNTIME_DEF_URL) \
ADD_CLUSTER_DEF_URL=$(ADD_CLUSTER_DEF_URL) \
FALLBACK_ADD_CLUSTER_DEF_URL=$(FALLBACK_ADD_CLUSTER_DEF_URL) \
SEGMENT_WRITE_KEY=$(SEGMENT_WRITE_KEY) \
DEV_MODE=$(DEV_MODE) \
OUT_FILE=$(OUT_DIR)/$(CLI_NAME)-$* \
Expand Down
94 changes: 0 additions & 94 deletions build/add-cluster-script.yaml

This file was deleted.

18 changes: 4 additions & 14 deletions cmd/commands/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type (
)

var (
minAddClusterSupportedVersion = semver.MustParse("0.0.283")
minAddClusterSupportedVersion = semver.MustParse("0.0.283")
minAddClusterLabelsSupportedVersion = semver.MustParse("0.0.462")

serviceAccountGVK = resid.Gvk{
Expand Down Expand Up @@ -384,7 +384,7 @@ func createAddClusterManifests(opts *ClusterAddOptions, ingressUrl, server, csdp
return nil, "", fmt.Errorf("failed encoding annotations: %w", err)
}

k.ConfigMapGenerator[0].KvPairSources.LiteralSources = append(k.ConfigMapGenerator[0].KvPairSources.LiteralSources, fmt.Sprintf("annotations=" + annotationsStr))
k.ConfigMapGenerator[0].KvPairSources.LiteralSources = append(k.ConfigMapGenerator[0].KvPairSources.LiteralSources, fmt.Sprintf("annotations="+annotationsStr))
}

if len(opts.labels) > 0 {
Expand All @@ -393,7 +393,7 @@ func createAddClusterManifests(opts *ClusterAddOptions, ingressUrl, server, csdp
return nil, "", fmt.Errorf("failed encoding labels: %w", err)
}

k.ConfigMapGenerator[0].KvPairSources.LiteralSources = append(k.ConfigMapGenerator[0].KvPairSources.LiteralSources, fmt.Sprintf("labels=" + labelsStr))
k.ConfigMapGenerator[0].KvPairSources.LiteralSources = append(k.ConfigMapGenerator[0].KvPairSources.LiteralSources, fmt.Sprintf("labels="+labelsStr))
}

if opts.tag != "" {
Expand All @@ -410,17 +410,7 @@ func createAddClusterManifests(opts *ClusterAddOptions, ingressUrl, server, csdp

manifests, err := kustutil.BuildKustomization(k)
if err != nil {
// go to fallback add-cluster manifests
// remove this once all manifests has been moved official-csdp repo.
// once we are sure no one will be looking for those manifests in cli-v2 we can remove this.
fallbackResourceUrl := fmt.Sprintf("%s?ref=v%s", store.FallbackAddClusterDefURL, version)
k.Resources[0] = fallbackResourceUrl
log.G().Warnf("Failed to get \"add-cluster\" manifests from %s, using fallback of %s", resourceUrl, fallbackResourceUrl)

manifests, err = kustutil.BuildKustomization(k)
if err != nil {
return nil, "", fmt.Errorf("failed to build kustomization: %w", err)
}
return nil, "", fmt.Errorf("failed to build kustomization: %w", err)
}

return manifests, nameSuffix, nil
Expand Down
4 changes: 2 additions & 2 deletions docs/releases/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cf version

```bash
# download and extract the binary
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.4/cf-linux-amd64.tar.gz | tar zx
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.5/cf-linux-amd64.tar.gz | tar zx

# move the binary to your $PATH
mv ./cf-linux-amd64 /usr/local/bin/cf
Expand All @@ -36,7 +36,7 @@ cf version

```bash
# download and extract the binary
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.4/cf-darwin-amd64.tar.gz | tar zx
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.5/cf-darwin-amd64.tar.gz | tar zx

# move the binary to your $PATH
mv ./cf-darwin-amd64 /usr/local/bin/cf
Expand Down
19 changes: 0 additions & 19 deletions hack/compare-versions.sh

This file was deleted.

8 changes: 0 additions & 8 deletions manifests/add-cluster/kustomize/kustomization.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions manifests/app-proxy/app-proxy.cm.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions manifests/app-proxy/app-proxy.crb.yaml

This file was deleted.

152 changes: 0 additions & 152 deletions manifests/app-proxy/app-proxy.deploy.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions manifests/app-proxy/app-proxy.rb.yaml

This file was deleted.

Loading

0 comments on commit a9c1e99

Please sign in to comment.