Skip to content

Fix previewctl SA, rebuild and update docker image #14095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workspaceLocation: gitpod/gitpod-ws.code-workspace
checkoutLocation: gitpod
ports:
Expand Down
2 changes: 1 addition & 1 deletion .werft/aks-installer-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pod:
secretName: self-hosted-github-oauth
containers:
- name: nightly-test
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: Always
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion .werft/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pod:
- name: MYSQL_TCP_PORT
value: 23306
- name: build
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: IfNotPresent
resources:
Expand Down
2 changes: 1 addition & 1 deletion .werft/cleanup-installer-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pod:
secretName: aks-credentials
containers:
- name: nightly-test
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: Always
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion .werft/debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pod:
- name: MYSQL_TCP_PORT
value: 23306
- name: build
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: IfNotPresent
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion .werft/eks-installer-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pod:
secretName: self-hosted-github-oauth
containers:
- name: nightly-test
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: Always
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion .werft/gke-installer-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pod:
secretName: self-hosted-github-oauth
containers:
- name: nightly-test
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: Always
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion .werft/ide-integration-tests-startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pod:
secretName: github-token-gitpod-bot
containers:
- name: gcloud
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: IfNotPresent
env:
Expand Down
2 changes: 1 addition & 1 deletion .werft/k3s-installer-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pod:
secretName: self-hosted-github-oauth
containers:
- name: nightly-test
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: Always
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion .werft/platform-delete-preview-environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pod:
secretName: harvester-vm-ssh-keys
containers:
- name: build
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: IfNotPresent
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion .werft/platform-delete-preview-environments-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pod:
secretName: github-token-gitpod-bot
containers:
- name: build
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: IfNotPresent
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion .werft/platform-trigger-artificial-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pod:
secretName: github-token-gitpod-bot
containers:
- name: build
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-dl.1
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: IfNotPresent
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion .werft/platform-trigger-werft-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pod:
secretName: gcp-sa-gitpod-dev-deployer
containers:
- name: build
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: IfNotPresent
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion .werft/workspace-run-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pod:
secretName: github-token-gitpod-bot
containers:
- name: gcloud
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:af-add-fish-to-dev-image.0
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aa-previewctl-fix-rebuild.6
workingDir: /workspace
imagePullPolicy: IfNotPresent
env:
Expand Down
2 changes: 1 addition & 1 deletion dev/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

FROM gitpod/workspace-full:2022-10-15-02-50-27

ENV TRIGGER_REBUILD 22
ENV TRIGGER_REBUILD 23

USER root

Expand Down
13 changes: 4 additions & 9 deletions dev/preview/previewctl/cmd/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ type getCredentialsOpts struct {
gcpClient *gcloud.Config
logger *logrus.Logger

serviceAccountPath string
kubeConfigSavePath string

getCredentialsMap map[string]func(ctx context.Context) (*api.Config, error)
configMap map[string]*api.Config
}
Expand All @@ -46,18 +43,16 @@ func newGetCredentialsCommand(logger *logrus.Logger) *cobra.Command {
var client *gcloud.Config
ctx := context.Background()
opts := &getCredentialsOpts{
logger: logger,
kubeConfigSavePath: kubeConfigSavePath,
serviceAccountPath: serviceAccountPath,
configMap: map[string]*api.Config{},
logger: logger,
configMap: map[string]*api.Config{},
}

cmd := &cobra.Command{
Use: "get-credentials",
Long: `previewctl get-credentials retrieves the kubernetes configs for core-dev and harvester clusters,
merges them with the default config, and outputs them either to stdout or to a file.`,
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
client, err = gcloud.New(ctx, opts.serviceAccountPath)
client, err = gcloud.New(ctx, serviceAccountPath)
if err != nil {
return err
}
Expand Down Expand Up @@ -118,7 +113,7 @@ func (o *getCredentialsOpts) mergeContexts() error {
return err
}

if o.kubeConfigSavePath != "" {
if kubeConfigSavePath != "" {
return clientcmd.WriteToFile(*finalConfig, kubeConfigSavePath)
}

Expand Down