diff --git a/.helm/templates/ecr-image-pull-secret.yaml b/.helm/templates/ecr-image-pull-secret.yaml index c46fc607c..6f4f759a1 100644 --- a/.helm/templates/ecr-image-pull-secret.yaml +++ b/.helm/templates/ecr-image-pull-secret.yaml @@ -82,7 +82,7 @@ spec: - secretRef: name: {{ .Chart.Name }}-ecr-login-renew-secrets --- -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: name: {{ .Chart.Name }}-ecr-login-renew-cron-job diff --git a/Jenkinsfile b/Jenkinsfile index 9fca0c4e4..b6a699bf2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -110,7 +110,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-test"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod4"]) { tadaWithWerfNamespaces(rancherProject: "reopt-api-dev", primaryBranch: "master", dbBaseName: "reopt_api_development", baseDomain: "${DEVELOPMENT_BASE_DOMAIN}") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ @@ -145,7 +145,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod2"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod4"]) { tadaWithWerfNamespaces(rancherProject: "reopt-api-staging", primaryBranch: "master", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ @@ -180,7 +180,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod2"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod5"]) { tadaWithWerfNamespaces(rancherProject: "reopt-api-production", primaryBranch: "master") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ diff --git a/Jenkinsfile-image-cleanup b/Jenkinsfile-image-cleanup index 30fec4993..10b5c0951 100644 --- a/Jenkinsfile-image-cleanup +++ b/Jenkinsfile-image-cleanup @@ -38,7 +38,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - tadaRancherAllProjectNamespacesKubeConfig(projects: [[credentialsId: "kubeconfig-nrel-reopt-test", rancherProject: "reopt-api-dev"], [credentialsId: "kubeconfig-nrel-reopt-prod2", rancherProject: "reopt-api-staging"], [credentialsId: "kubeconfig-nrel-reopt-prod2", rancherProject: "reopt-api-production"]]) { + tadaRancherAllProjectNamespacesKubeConfig(projects: [[credentialsId: "kubeconfig-nrel-reopt-prod4", rancherProject: "reopt-api-dev"], [credentialsId: "kubeconfig-nrel-reopt-prod4", rancherProject: "reopt-api-staging"], [credentialsId: "kubeconfig-nrel-reopt-prod5", rancherProject: "reopt-api-production"]]) { withCredentials([gitUsernamePassword(credentialsId: "github-nrel-gov-admin")]) { sh "werf cleanup --scan-context-namespace-only" } diff --git a/Jenkinsfile-undeploy-develop b/Jenkinsfile-undeploy-develop index a24e97e2b..b0c9f9a86 100644 --- a/Jenkinsfile-undeploy-develop +++ b/Jenkinsfile-undeploy-develop @@ -55,7 +55,7 @@ pipeline { stages { stage("undeploy-branches") { steps { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-test"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod4"]) { tadaUndeployEachBranch(rancherProject: env.RANCHER_PROJECT, undeployDeletedBranches: params.UNDEPLOY_DELETED_BRANCHES, undeployMergedBranches: params.UNDEPLOY_MERGED_BRANCHES, undeployBranchNames: params.UNDEPLOY_BRANCH_NAMES, primaryBranch: "master") { tadaWithWerfEnv(rancherProject: env.RANCHER_PROJECT, dbBaseName: env.DB_BASE_NAME) { tadaUndeployBranch() diff --git a/Jenkinsfile-undeploy-staging b/Jenkinsfile-undeploy-staging index 571b34ba8..548e0045b 100644 --- a/Jenkinsfile-undeploy-staging +++ b/Jenkinsfile-undeploy-staging @@ -55,7 +55,7 @@ pipeline { stages { stage("undeploy-branches") { steps { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod2"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod4"]) { tadaUndeployEachBranch(rancherProject: env.RANCHER_PROJECT, undeployDeletedBranches: params.UNDEPLOY_DELETED_BRANCHES, undeployMergedBranches: params.UNDEPLOY_MERGED_BRANCHES, undeployBranchNames: params.UNDEPLOY_BRANCH_NAMES, primaryBranch: "master") { tadaWithWerfEnv(rancherProject: env.RANCHER_PROJECT, dbBaseName: env.DB_BASE_NAME) { tadaUndeployBranch() diff --git a/reoptjl/views.py b/reoptjl/views.py index d0797ccbd..28b4cab9b 100644 --- a/reoptjl/views.py +++ b/reoptjl/views.py @@ -385,6 +385,7 @@ def peak_load_outage_times(request): summer_load = critical_load[summer_start:autumn_start] autumn_load = critical_load[autumn_start:winter_start] peaks = np.array([ + # +1s to convert to 1-based indexing because that's what outage_start_time_steps input use (np.argmax(winter_load) + winter_start) % 8760 + 1, np.argmax(spring_load) + spring_start + 1, np.argmax(summer_load) + summer_start + 1,