Skip to content
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

PerfectScale optional component #106

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: perfectscale-components
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: '180'
spec:
project: core
source:
repoURL: <GIT_REPOSITORY_GIT_URL>
path: gitops-pipelines/delivery/clusters/cc-cluster/core-services/components/perfectscale
targetRevision: HEAD
destination:
server: 'https://kubernetes.default.svc'
namespace: perfectscale
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
retry:
limit: 5
backoff:
duration: 30s
maxDuration: 15m0s
factor: 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: perfectscale
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "180"
spec:
project: core
source:
repoURL: https://perfectscale-io.github.io
chart: exporter
targetRevision: v1.0.41
helm:
values: |-
secret:
name: perfectscale-secret
settings:
clusterName: cg-devx-perfectscale
additionalLabels:
cg-devx.cost-allocation.cost-center: platform
cg-devx.metadata.owner: <GITOPS_REPOSITORY_NAME>-admin
cg-devx.metadata.service: scaler.perfectscale
cg-devx.metadata.chart-version: 1.0.41
cg-devx.metadata.version: 1.0.0
destination:
server: 'https://kubernetes.default.svc'
namespace: perfectscale
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: psc-autoscaler
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "180"
spec:
project: core
source:
repoURL: https://perfectscale-io.github.io
chart: psc-autoscaler
targetRevision: v1.0.10
helm:
values: |-
secret:
create: false
destination:
server: 'https://kubernetes.default.svc'
namespace: perfectscale
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: perfectscale-secret
annotations:
argocd.argoproj.io/sync-wave: "180"
spec:
target:
name: perfectscale-secret
secretStoreRef:
kind: ClusterSecretStore
name: vault-kv-secret
refreshInterval: 10s
dataFrom:
- extract:
key: /perfectscale-secret
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: perfectscale.io/v1
kind: ClusterAutomationConfig
metadata:
name: cluster-automation-config
spec:
automation:
operational:
stopAllAutomation: false
workloadTypes:
Deployment:
operational:
automationMode: "Disabled"
restrictions:
StatefulSet:
operational:
automationMode: "Disabled"
restrictions:
DaemonSet:
operational:
automationMode: "Disabled"
restrictions:
13 changes: 13 additions & 0 deletions platform/terraform/modules/secrets_vault/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,16 @@ resource "vault_generic_secret" "oauth2_cookie_secret" {

depends_on = [vault_mount.secret]
}

resource "vault_generic_secret" "perfectscale_secret" {
path = "secret/perfectscale-secret"

data_json = jsonencode(
{
clientId = "",
clientSecret = "",
}
)

depends_on = [vault_mount.secret]
}
4 changes: 4 additions & 0 deletions tools/cli/commands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,14 @@ for checkpointing, allowing the command to be rerun if necessary.
- keda
- kubevirt
- nvidia-gpu-operator
- perfectscale
- vpa

> **Note!**: Use kebab-case for all parameter names.

When installing PerfectScale, you should set `clientId` and `clientSecret` in your secret store (
path `secret/perfectscale-secret`) to values provided in PerfectScale UI.

### Examples

**Using command arguments:**
Expand Down
1 change: 1 addition & 0 deletions tools/cli/common/enums/optional_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class OptionalServices(str, enum.Enum):
KEDA = "keda"
KUBEVIRT = "kubevirt"
ClusterAutoScaler = 'cluster-auto-scaler'
PerfectScale = 'perfectscale'

@classmethod
def has_value(cls, value) -> bool:
Expand Down
1 change: 1 addition & 0 deletions tools/cli/common/utils/optional_services_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
OptionalServices.KEDA: ["180-keda.yaml"],
OptionalServices.KUBEVIRT: ["180-kubevirt.yaml"],
OptionalServices.VPA: ["180-vpa.yaml"],
OptionalServices.PerfectScale: ["180-perfectscale.yaml"],
OptionalServices.ClusterAutoScaler: ["30-cluster-autoscaler.yaml"]
}

Expand Down