planetscale / planetscale/vitess-operator

[Bug] Using "latest" image tag breaks versioned deployments of operator

Open
#688 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
372
Forks
102
Avg merge
3d 5h
Merged PRs (30d)
15

Description

The deployment manifest of the vitess-operator uses the latest tag (https://github.com/planetscale/vitess-operator/blob/1001a86b8a9787180a1cd47a0d88a121da712d61/deploy/operator.yaml#L19C1-L19C50) which breaks this deployment in case the k8s configuration at a tagged branch is incompatible with the latest image.

I found this when tried to deploy the manifests of version v2.14.0 of the operator:

kubectl apply -k "github.com/planetscale/vitess-operator/deploy?ref=v2.14.0"

The latest version of the image requires access to the horizontalpodautoscalers, but the role definition at the v2.14.0 tag (https://github.com/planetscale/vitess-operator/blob/v2.14.0/deploy/role.yaml) does not yet include permissions for those resources as it does in the v2.15.0 tag: (https://github.com/planetscale/vitess-operator/blob/v2.15.0-rc1/deploy/role.yaml)

rules:
...
...

- apiGroups:
 - autoscaling
 resources:
 - horizontalpodautoscalers
 verbs:
 - '*'

I would suggest matching the tag either directly in the deploy/operator.yaml or by adding a section like

images:
  - name: planetscale/vitess-operator
    newTag: <version>

in deploy/kustomization.yaml

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare deploy/operator.yaml and deploy/kustomization.yaml at the versioned tags, starting with the v2.14.0 manifest and its image reference. Check how the image tag is selected and verify that applying the versioned Kustomize deployment uses a compatible operator image and permissions. Done means a tagged deployment no longer pulls latest and can be applied with the documented kubectl apply -k command.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.