From 70810151107833d6f3223f3feb21c5dee3c4a736 Mon Sep 17 00:00:00 2001 From: Shane Unruh Date: Fri, 19 Nov 2021 10:48:55 -0700 Subject: [PATCH] Perge chart --- Jenkinsfile.github | 10 - Makefile | 12 +- kubernetes/README.md | 3 - kubernetes/cray-hms-capmc/.gitignore | 2 - kubernetes/cray-hms-capmc/Chart.yaml | 6 - kubernetes/cray-hms-capmc/README.md | 3 - kubernetes/cray-hms-capmc/files/config.toml | 189 ------------------ kubernetes/cray-hms-capmc/requirements.lock | 6 - kubernetes/cray-hms-capmc/requirements.yaml | 4 - kubernetes/cray-hms-capmc/templates/NOTES.txt | 1 - .../cray-hms-capmc/templates/_helpers.tpl | 3 - .../cray-hms-capmc/templates/configmap.yaml | 17 -- kubernetes/cray-hms-capmc/values.yaml | 81 -------- 13 files changed, 1 insertion(+), 336 deletions(-) delete mode 100644 kubernetes/README.md delete mode 100644 kubernetes/cray-hms-capmc/.gitignore delete mode 100644 kubernetes/cray-hms-capmc/Chart.yaml delete mode 100644 kubernetes/cray-hms-capmc/README.md delete mode 100644 kubernetes/cray-hms-capmc/files/config.toml delete mode 100644 kubernetes/cray-hms-capmc/requirements.lock delete mode 100644 kubernetes/cray-hms-capmc/requirements.yaml delete mode 100644 kubernetes/cray-hms-capmc/templates/NOTES.txt delete mode 100644 kubernetes/cray-hms-capmc/templates/_helpers.tpl delete mode 100644 kubernetes/cray-hms-capmc/templates/configmap.yaml delete mode 100644 kubernetes/cray-hms-capmc/values.yaml diff --git a/Jenkinsfile.github b/Jenkinsfile.github index 6d349a0..9323665 100644 --- a/Jenkinsfile.github +++ b/Jenkinsfile.github @@ -17,8 +17,6 @@ pipeline { VERSION = getDockerBuildVersion(isStable: env.IS_STABLE) DOCKER_ARGS = getDockerBuildArgs(name: "hms-capmc", description: env.DESCRIPTION, version: env.VERSION) NO_CACHE = "--no-cache" - CHART_NAME = "cray-hms-capmc" - CHART_VERSION = getChartVersion(version: env.VERSION) TEST_NAME = "hms-capmc-ct-test" TEST_SPEC_FILE = "hms-capmc-ct-test.spec" BUILD_METADATA = getRpmRevision(isStable: env.IS_STABLE) @@ -43,13 +41,6 @@ pipeline { } } - stage("Build Chart") { - steps { - updateCsmHelmChartAppVersion(chartPath: "${WORKSPACE}/kubernetes/${CHART_NAME}", appVersion: env.VERSION) - sh "make chart" - } - } - stage("Test Rpm") { steps { echo "RPM build metadata is: ${env.BUILD_METADATA}" @@ -62,7 +53,6 @@ pipeline { steps { script { publishCsmDockerImage(image: env.NAME, tag: env.VERSION, isStable: env.IS_STABLE) - publishCsmHelmCharts(component: env.CHART_NAME, chartsPath: "${WORKSPACE}/kubernetes/.packaged", isStable: env.IS_STABLE) publishCsmRpms(component: env.TEST_NAME, pattern: "dist/capmc-ct-test-rpmbuild/RPMS/x86_64/*.rpm", arch: "x86_64", isStable: env.IS_STABLE) publishCsmRpms(component: env.TEST_NAME, pattern: "dist/capmc-ct-test-rpmbuild/SRPMS/*.rpm", arch: "src", isStable: env.IS_STABLE) } diff --git a/Makefile b/Makefile index c03eed7..d256e54 100644 --- a/Makefile +++ b/Makefile @@ -24,11 +24,6 @@ NAME ?= cray-capmc VERSION ?= $(shell cat .version) -# Helm Chart -CHART_PATH ?= kubernetes -CHART_NAME ?= cray-hms-capmc -CHART_VERSION ?= $(shell cat .version) - # Common RPM variable BUILD_METADATA ?= "1~development~$(shell git rev-parse --short HEAD)" @@ -40,16 +35,11 @@ TEST_SOURCE_NAME ?= ${TEST_SPEC_NAME}-${TEST_RPM_VERSION} TEST_BUILD_DIR ?= $(PWD)/dist/capmc-ct-test-rpmbuild TEST_SOURCE_PATH := ${TEST_BUILD_DIR}/SOURCES/${TEST_SOURCE_NAME}.tar.bz2 -all : image chart unittest integration test_rpm +all : image unittest integration test_rpm image: docker build ${NO_CACHE} --pull ${DOCKER_ARGS} --tag '${NAME}:${VERSION}' . -chart: - helm repo add cray-algol60 https://artifactory.algol60.net/artifactory/csm-helm-charts - helm dep up ${CHART_PATH}/${CHART_NAME} - helm package ${CHART_PATH}/${CHART_NAME} -d ${CHART_PATH}/.packaged --version ${CHART_VERSION} - unittest: ./runUnitTest.sh diff --git a/kubernetes/README.md b/kubernetes/README.md deleted file mode 100644 index 6b3fa2f..0000000 --- a/kubernetes/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Resources for cray-hms-capmc - -* Helm Chart(s) diff --git a/kubernetes/cray-hms-capmc/.gitignore b/kubernetes/cray-hms-capmc/.gitignore deleted file mode 100644 index 917ff8a..0000000 --- a/kubernetes/cray-hms-capmc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# by default we'll ignore any subcharts included, but simply adjust this if need be -charts/* diff --git a/kubernetes/cray-hms-capmc/Chart.yaml b/kubernetes/cray-hms-capmc/Chart.yaml deleted file mode 100644 index a6dbb20..0000000 --- a/kubernetes/cray-hms-capmc/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -apiVersion: v1 -description: "Kubernetes resources for cray-hms-capmc" -name: "cray-hms-capmc" -home: "HMS/hms-capmc" -version: 1.29.0 diff --git a/kubernetes/cray-hms-capmc/README.md b/kubernetes/cray-hms-capmc/README.md deleted file mode 100644 index 1d87462..0000000 --- a/kubernetes/cray-hms-capmc/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# cray-hms-capmc Helm chart - -In most cases the resources here should be left at their defaults. Should you need to add additional resources to your helm chart, you have the ability to do so. If you find that you're making changes that might be applicable to other Cray services, you're encouraged to submit a pull request to [the base service chart](https://stash.us.cray.com/projects/CLOUD/repos/cray-charts/browse/stable/cray-service). diff --git a/kubernetes/cray-hms-capmc/files/config.toml b/kubernetes/cray-hms-capmc/files/config.toml deleted file mode 100644 index 9cd6f1c..0000000 --- a/kubernetes/cray-hms-capmc/files/config.toml +++ /dev/null @@ -1,189 +0,0 @@ -# Copyright 2019-2020 Hewlett Packard Enterprise Development LP -# -# This config file describes CAPMC operational configuration parameters. -# - -# The NodeRules section describes rules/guidelines for CAPMC node control. -# The get_note_rules API returns these values. -[NodeRules] - -# Minimum time, in seconds, which a node must reamin in the off state -# after a shutdown and power off operation. Use -1 for no limit. -MinOffTime = -1 - -# Maximum time, in seconds, which a node may be in the off state. Use -1 -# for no limit. -MaxOffTime = -1 - -# The NodeRules.Off subsection describes rules/guidelines for node_off. -[NodeRules.Off] - -# Approximate time, in seconds, for a node cleanly shutdown and power off. -Latency = 60 - -# Maximum number of nodes which may be powered off at once. Use -1 for no limit. -MaxRequest = -1 - -# The NodeRules.On subsection describes rules/guidelines for node_on. -[NodeRules.On] - -# Approximate time, in seconds, for a node to power on and boot to Ready state. -Latency = 120 - -# Maximum number of nodes which may be powered on at once. Use -1 for no limit. -MaxRequest = -1 - -# The NodeRules.Reinit subsection describes rules/guidelines for node_reint. -[NodeRules.Reinit] - -# Approximate time, in seconds, for a node cleanly shutdown, power off, power -# on, and boot to Ready state. -Latency = 180 - -# Maximum number of nodes allowed to be included in a node reinit request. -# Use -1 for no limit. -MaxRequest = -1 - -# The PowerControls section describes guidelines/policy/rules applying -# generally to CAPMC power off (down) / on (up) of hardware. These values -# should only be edited under direction from Cray service personnel. -[PowerControls] - -# The PowerControls.ForceOff subsection describes guidelines/policy/rules -# applying to a force off action. -[PowerControls.ForceOff] - -# Block components with these roles from power force off actions. -# BlockRole = ["Management"] - -# An ordered list desribing the power force off sequence for components. -ComponentSequence = ["Node", "ComputeModule", "HSNBoard", "RouterModule", "Chassis", "CabinetPDUOutlet", "CabinetPDUPowerConnector"] - -# Mapping of CAPMC force off to Redfish ResetType. -ResetType = ["ForceOff"] - -# The PowerControls.ForceOn subsection describes guidelines/policy/rules -# applying to a force on action. -[PowerControls.ForceOn] - -# Block components with these roles from power force on actions. -# BlockRole = ["Management"] - -# An ordered list desribing the power force on sequence for components. -ComponentSequence = ["CabinetPDUPowerConnector", "CabinetPDUOutlet", "Chassis", "RouterModule", "HSNBoard", "ComputeModule", "Node"] - -# Mapping of CAPMC force on to Redfish ResetType. -ResetType = ["ForceOn"] - -# The PowerControls.ForceRestart subsection describes guidelines/policy/rules -# applying to a force restart (reinit) action. -[PowerControls.ForceRestart] - -# Block components with these roles from power force restart actions. -# BlockRole = ["Management"] - -# An ordered list desribing the power force restart sequence for components. -ComponentSequence = ["Node"] - -# Mapping of CAPMC force restart (reinit) to Redfish ResetType. -ResetType = ["ForceRestart", "PowerCycle"] - -# The PowerControls.off subsection describes guidelines/policy/rules -# applying to an off action. -[PowerControls.Off] - -# Block components with these roles from power off actions. -# BlockRole = ["Management"] - -# An ordered list desribing the power off sequence for components. -ComponentSequence = ["Node", "ComputeModule", "HSNBoard", "RouterModule", "Chassis", "CabinetPDUOutlet", "CabinetPDUPowerConnector"] - -# Mapping of CAPMC (graceful) off to Redfish ResetType. -ResetType = ["GracefulShutdown", "PushPowerButton", "Off"] - -# The PowerControls.On subsection describes guidelines/policy/rules -# applying to an on action. -[PowerControls.On] - -# Block components with these roles from power on actions. -# BlockRole = ["Management"] - -# An ordered list desribing the power on sequence for components. -ComponentSequence = ["CabinetPDUPowerConnector", "CabinetPDUOutlet", "Chassis", "RouterModule", "HSNBoard", "ComputeModule", "Node"] - -# Mapping of CAPMC (graceful) on to Redfish ResetType. -ResetType = ["On"] - -# The PowerControls.Resetart subsection describes guidelines/policy/rules -# applying to a restart (AKA reinit) action. -[PowerControls.Restart] - -# Block components with these roles from power restart actions. -# BlockRole = ["Management"] - -# An ordered list desribing the power restart sequence for components. -ComponentSequence = ["Node"] - -# Mapping of CAPMC (graceful) restart to Redfish ResetType. -ResetType = ["GracefulRestart"] - -# NOTE NMI is a future CAPMC enhancement. Actual configuration TBD. -[PowerControls.NMI] - -# Block components with these roles from a NMI action. -# NOTE: "" covers any component without an assigned role. -# BlockRole = ["Management"] - -# An ordered list desribing the NMI sequence for components. -ComponentSequence = ["Node"] - -# Mapping of CAPMC NMI to Redfish ResetType. -ResetType = ["Nmi"] - -[SystemParameters] - -# Administratively defined upper limit on system power -PowerCapTarget = 0 - -# System power level, which if crossed, will result in Cray management software -# emitting over power budget warnings -PowerThreshold = 0 - -# Additional static system wide power overhead which is unreported, specified -# in watts -StaticPower = 0 - -# True if out-of-band HSS power ramp rate limiting features are enabled -RampLimited = false - -# Administratively defined maximum rate of change (increasing or decreasing) in -# system wide power consumption, specified in watts per minute -RampLimit = 2000000 - -# Administratively defined minimum allowable system power consumption, -# specified in watts -PowerBandMin = 0 - -# Administratively defined maximum allowable system power consumption, -# specified in watts -PowerBandMax = 0 - -[CapmcConfiguration] - -# Number of workers that are available to execute in parallel for Redfish calls -# ActionMaxWorkers = 1000 - -# CAPMC behavior for a power action that target hardware does not support -# Valid options: simulate, ignore, error -# simulate - For components that do not support GracefulRestart or -# ForceRestart, simulate will turn the node Off then On again -# ignore - Skip the component but notify the user it was ignored -# error - Halt the power operation and notify the user -# OnUnsupportedAction = "simulate" - -# CAPMC will check power state of components when an Off request has been -# issued. CAPMC will return from the Off request when it has verified that the -# target components are off or if the number of retries have been exceeded. -# WaitForOffRetries = 4 -# Amount of time to sleep between checks of component power state for Off. -# WaitForOffSleep = 15 diff --git a/kubernetes/cray-hms-capmc/requirements.lock b/kubernetes/cray-hms-capmc/requirements.lock deleted file mode 100644 index c69f050..0000000 --- a/kubernetes/cray-hms-capmc/requirements.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: cray-service - repository: https://artifactory.algol60.net/artifactory/csm-helm-charts - version: 6.0.0 -digest: sha256:70f9ad5c076e41732062b22a41d72e2fbfd4f6934819bb1c869da90efcdd4252 -generated: "2021-09-21T12:15:38.384595-05:00" diff --git a/kubernetes/cray-hms-capmc/requirements.yaml b/kubernetes/cray-hms-capmc/requirements.yaml deleted file mode 100644 index c2f34ba..0000000 --- a/kubernetes/cray-hms-capmc/requirements.yaml +++ /dev/null @@ -1,4 +0,0 @@ -dependencies: -- name: cray-service - version: "~6.0.0" - repository: "@cray-algol60" diff --git a/kubernetes/cray-hms-capmc/templates/NOTES.txt b/kubernetes/cray-hms-capmc/templates/NOTES.txt deleted file mode 100644 index e22a9c6..0000000 --- a/kubernetes/cray-hms-capmc/templates/NOTES.txt +++ /dev/null @@ -1 +0,0 @@ -Installation info for chart {{ include "cray-service.name" . }}: diff --git a/kubernetes/cray-hms-capmc/templates/_helpers.tpl b/kubernetes/cray-hms-capmc/templates/_helpers.tpl deleted file mode 100644 index 0f94513..0000000 --- a/kubernetes/cray-hms-capmc/templates/_helpers.tpl +++ /dev/null @@ -1,3 +0,0 @@ -{{/* -Add helper methods here for your chart -*/}} diff --git a/kubernetes/cray-hms-capmc/templates/configmap.yaml b/kubernetes/cray-hms-capmc/templates/configmap.yaml deleted file mode 100644 index 9bacb7c..0000000 --- a/kubernetes/cray-hms-capmc/templates/configmap.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: cray-capmc-configuration - namespace: services -data: - config.toml: |- -{{ .Files.Get "files/config.toml" | indent 4 }} - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: capmc-cacert-info -data: - CA_URI: "{{ .Values.hms_ca_uri }}" - diff --git a/kubernetes/cray-hms-capmc/values.yaml b/kubernetes/cray-hms-capmc/values.yaml deleted file mode 100644 index a9cf6d6..0000000 --- a/kubernetes/cray-hms-capmc/values.yaml +++ /dev/null @@ -1,81 +0,0 @@ -# Please refer to https://stash.us.cray.com/projects/CLOUD/repos/cray-charts/browse/stable/cray-service/values.yaml?at=refs%2Fheads%2Fmaster -# for more info on values you can set/override -# Note that cray-service.containers[*].image and cray-service.initContainers[*].image map values are one of the only structures that -# differ from the standard kubernetes container spec: -# image: -# repository: "" -# tag: "" (default = "latest") -# pullPolicy: "" (default = "IfNotPresent") -hms_ca_uri: "" - -cray-service: - type: "Deployment" - nameOverride: "cray-capmc" - fullnameOverride: "cray-capmc" - replicaCount: 3 - containers: - cray-capmc: - name: "cray-capmc" - image: - repository: "cray/cray-capmc" - ports: - - name: http - containerPort: 27777 - env: - - name: HSM_URL - value: "http://cray-smd" - - name: CAPMC_CONFIG - value: "/usr/local/etc/capmc-service/config.toml" - - name: DB_HOSTNAME - value: sma-postgres-cluster.sma.svc.cluster.local - - name: DB_PORT - value: "5432" - - name: VAULT_ADDR - value: "http://cray-vault.vault:8200" - - name: VAULT_SKIP_VERIFY - value: "true" - - name: CAPMC_CA_URI - valueFrom: - configMapKeyRef: - name: capmc-cacert-info - key: CA_URI - livenessProbe: - httpGet: - port: 27777 - path: /capmc/liveness - initialDelaySeconds: 10 - periodSeconds: 20 - readinessProbe: - httpGet: - port: 27777 - path: /capmc/readiness - initialDelaySeconds: 5 - periodSeconds: 60 - resources: - limits: - cpu: "10" - memory: 2Gi - requests: - cpu: "2" - memory: 128Mi - volumeMounts: - - name: cray-capmc-config-vol - mountPath: /usr/local/etc/capmc-service/config.toml - readOnly: true - subPath: config.toml - - name: cray-pki-cacert-vol - mountPath: /usr/local/cray-pki - volumes: - cray-capmc-config-vol: - name: cray-capmc-config-vol - configMap: - name: cray-capmc-configuration - cray-pki-cacert-vol: - name: cray-pki-cacert-vol - configMap: - name: cray-configmap-ca-public-key - - ingress: - enabled: true - uri: " " - prefix: /apis/capmc