Skip to content

Commit cc82d2c

Browse files
carlossgclaude
andcommitted
chore: remove unused GITHUB_TOKEN secret infrastructure
The plugin does not read GITHUB_TOKEN at runtime (no os.Getenv call in Go source). Remove all artefacts that implied it did: - delete config/argo-rollouts/secret.yaml.template - remove secret.yaml resource from kustomization.yaml - remove generate-secret Makefile target and its generate dependency - delete env.example - drop secret.yaml from .gitignore Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Carlos Sanchez <carlos@apache.org>
1 parent b26dbdc commit cc82d2c

5 files changed

Lines changed: 1 addition & 35 deletions

File tree

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@ bin/
22
vendor/
33
cover.out
44
.env
5-
6-
# Generated secret files
7-
secret.yaml

Makefile

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
4646
# $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
4747

4848
.PHONY: generate
49-
generate: controller-gen config/argo-rollouts/secret.yaml ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
49+
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
5050
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
5151

5252
.PHONY: fmt
@@ -84,22 +84,6 @@ test-e2e: setup-test-e2e manifests generate fmt vet ## Run the e2e tests. Expect
8484
cleanup-test-e2e: ## Tear down the Kind cluster used for e2e tests
8585
@$(KIND) delete cluster --name $(KIND_CLUSTER)
8686

87-
.PHONY: config/argo-rollouts/secret.yaml
88-
config/argo-rollouts/secret.yaml: config/argo-rollouts/secret.yaml.template
89-
@if [ ! -f .env ]; then \
90-
echo "⚠️ Warning: .env file not found. Using environment variables directly."; \
91-
else \
92-
echo "Loading environment variables from .env file..."; \
93-
export $$(grep -v '^#' .env | xargs); \
94-
fi; \
95-
if [ -z "$$GOOGLE_API_KEY" ]; then \
96-
echo "⚠️ Warning: GOOGLE_API_KEY not set"; \
97-
fi; \
98-
if [ -z "$$GITHUB_TOKEN" ]; then \
99-
echo "⚠️ Warning: GITHUB_TOKEN not set"; \
100-
fi; \
101-
echo "Generating secret from environment variables..."; \
102-
GOOGLE_CLOUD_PROJECT=$$(gcloud config get-value project 2>/dev/null || echo "") envsubst < config/argo-rollouts/secret.yaml.template > config/argo-rollouts/secret.yaml
10387

10488
.PHONY: lint
10589
lint: golangci-lint ## Run golangci-lint linter

config/argo-rollouts/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ images:
77
# downloaded from https://github.com/argoproj/argo-rollouts/releases/download/v1.9.0/install.yaml
88
resources:
99
- install.yaml
10-
- secret.yaml
1110
namespace: argo-rollouts
1211
patches:
1312
- patch: |

config/argo-rollouts/secret.yaml.template

Lines changed: 0 additions & 12 deletions
This file was deleted.

env.example

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)