Skip to content

Commit

Permalink
manifests: Improve "autoscale" kustomization
Browse files Browse the repository at this point in the history
* Remove "base" base: Allows user to use "autoscale" along "base",
  "release", or "test". Example:

  ```yaml
  apiVersion: kustomize.config.k8s.io/v1beta1
  kind: Kustomization
  resources:
  - github.com/kubernetes-sigs/metrics-server/manifests/release?ref=v0.5.0
  - github.com/kubernetes-sigs/metrics-server/manifests/autoscale?ref=v0.5.0
  ```

* Delete metrics-server container resources: Since they are managed by
  the nanny sidecar, re-applying the manifest could restart the deployment
  unnecessarily. This is especially obvious with a GitOps tool like Argo CD,
  which would show a diff between manifest and resources set by the addon-resizer
  • Loading branch information
maxbrunet committed Jul 1, 2021
1 parent 520ba3b commit a3a08a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions manifests/autoscale/kustomization.yaml
@@ -1,7 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../base
patchesStrategicMerge:
- patch.yaml

4 changes: 4 additions & 0 deletions manifests/autoscale/patch.yaml
Expand Up @@ -8,6 +8,10 @@ spec:
template:
spec:
containers:
- name: metrics-server
# Resources are set by the nanny sidecar
resources:
$patch: delete
- name: metrics-server-nanny
image: k8s.gcr.io/addon-resizer:1.8.11
resources:
Expand Down

0 comments on commit a3a08a7

Please sign in to comment.