Skip to content

Commit

Permalink
Added scale up clair for managed component
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubhra Deshpande committed Oct 3, 2024
1 parent 82188de commit ff8f6ca
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patchesStrategicMerge:
- ./clair.deployment.patch.yaml
resources:
- "../base"

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: clair-app

spec:
replicas: 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patchesStrategicMerge:
- ./clair.deployment.patch.yaml

5 changes: 4 additions & 1 deletion pkg/kustomize/kustomize.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,11 @@ func KustomizationFor(
if ctx.NeedsClairPgUpgrade {
if v1.ComponentIsManaged(quay.Spec.Components, v1.ComponentClair) {
componentPaths = append(componentPaths, "../components/clairpgupgrade/scale-down-clair")
componentPaths = append(componentPaths, "../components/clairpgupgrade/base")
componentPaths = append(componentPaths, "../components/clairpgupgrade/scale-up-clair")
} else {
componentPaths = append(componentPaths, "../components/clairpgupgrade/base")
}
componentPaths = append(componentPaths, "../components/clairpgupgrade/base")
}

images := []types.Image{}
Expand Down

0 comments on commit ff8f6ca

Please sign in to comment.