Skip to content

Commit

Permalink
Final update
Browse files Browse the repository at this point in the history
  • Loading branch information
curtbushko committed Apr 16, 2024
1 parent 84792e2 commit 973c362
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/weekly-openshift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Dispatch to the consul-k8s-workflows with a weekly cron
#
# A separate file is needed for each release because the cron schedules are different for each release.
name: weekly-openshift
on:
pull_request:

on:
schedule:
# * is a special character in YAML so you have to quote this string
# Run weekly on Monday at 5AM UTC/1AM EST
- cron: '0 5 * * 1'


# these should be the only settings that you will ever need to change
env:
BRANCH: "curtbushko/update-openshift-provider"
CONTEXT: "weekly"

jobs:
openshift:
name: openshift
runs-on: ubuntu-latest
steps:
- uses: benc-uk/workflow-dispatch@798e70c97009500150087d30d9f11c5444830385 # v1.2.2
name: openshift
with:
workflow: openshift.yml
repo: hashicorp/consul-k8s-workflows
ref: 'curtbushko/NET-197/openshift-nightly'
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
inputs: '{ "context":"${{ env.CONTEXT }}", "repository":"${{ github.repository }}", "branch":"${{ env.BRANCH }}", "sha":"${{ github.sha }}", "token":"${{ secrets.ELEVATED_GITHUB_TOKEN }}" }'
2 changes: 2 additions & 0 deletions charts/consul/test/terraform/openshift/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ resource "azurerm_subnet" "worker-subnet" {
resource "azuread_application" "test" {
count = var.cluster_count
display_name = "aro-consul-k8s-${random_id.suffix[count.index].dec}"
owners = [data.azurerm_client_config.current.object_id]
}

resource "azuread_service_principal" "test" {
count = var.cluster_count
client_id = azuread_application.test[count.index].application_id
owners = [data.azurerm_client_config.current.object_id]
}

resource "random_password" "password" {
Expand Down
2 changes: 1 addition & 1 deletion charts/consul/test/terraform/openshift/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: MPL-2.0

variable "location" {
default = "westus2"
default = "eastus"
description = "The Azure Region to create all resources in."
}

Expand Down

0 comments on commit 973c362

Please sign in to comment.