Skip to content

Commit

Permalink
Feat/con 24236 add auto update option (#6)
Browse files Browse the repository at this point in the history
chore:  bumped chart to 0.1.31.
fix: disabled auto-update by default
feat: enabled rightsizing by default
fix: disabled helm --wait
  • Loading branch information
rkrmr33 authored Mar 24, 2024
1 parent 8fc4deb commit d3b99b7
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 42 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Create Release
on:
push:
branches:
- main
paths:
- './VERSION'

jobs:
create-release:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Get the next version
id: next-version
run: echo "VALUE=$(cat VERSION)" >> $GITHUB_OUTPUT

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.next-version.outputs.VALUE }}
release_name: ${{ steps.next-version.outputs.VALUE }}
draft: false
commitish: main # use the latest commit on main branch (including the new version)
prerelease: false
18 changes: 0 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,3 @@ jobs:
branch: release
delete-branch: true
labels: release_auto_version_bump

- name: Merge
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr merge ${{ steps.cpr.outputs.pull-request-number }} --repo ${{github.repository}} \
--admin --delete-branch --body "version bump ${{ steps.next-version.outputs.VALUE }}" -s
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.next-version.outputs.VALUE }}
release_name: ${{ steps.next-version.outputs.VALUE }}
draft: false
commitish: main # use the latest commit on main branch (including the new version)
prerelease: false
14 changes: 0 additions & 14 deletions .github/workflows/spot-common-workflow.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,3 @@ jobs:
branch: update-changelog-${{ github.ref }}
delete-branch: true
labels: update-changelog

- name: Merge
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr merge ${{ steps.cpr.outputs.pull-request-number }} --repo ${{github.repository}} \
--admin --delete-branch --body "update changelog ${{ github.ref }}" -s
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ module "kubernetes-controller" {
|------|-------------|------|---------|:--------:|
| <a name="input_base_url"></a> [base\_url](#input\_base\_url) | Specifies the base URL to be used by the HTTP client | `string` | `null` | no |
| <a name="input_ca_bundle_secret_name"></a> [ca\_bundle\_secret\_name](#input\_ca\_bundle\_secret\_name) | Overrides the default secret name for custom CA bundle | `string` | `null` | no |
| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | Specifies the version of the Helm chart to be installed | `string` | `"0.1.22"` | no |
| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | Specifies the version of the Helm chart to be installed | `string` | `"0.1.31"` | no |
| <a name="input_cluster_identifier"></a> [cluster\_identifier](#input\_cluster\_identifier) | Specifies the cluster identifier | `string` | `null` | no |
| <a name="input_config_map_name"></a> [config\_map\_name](#input\_config\_map\_name) | Overrides the default configmap name | `string` | `null` | no |
| <a name="input_controller_image"></a> [controller\_image](#input\_controller\_image) | Specifies the Docker image name for the Ocean Controller that should be deployed | `string` | `null` | no |
| <a name="input_controller_version"></a> [controller\_version](#input\_controller\_version) | Specifies the Docker version for the Ocean Controller that should be deployed | `string` | `null` | no |
| <a name="input_create_controller"></a> [create\_controller](#input\_create\_controller) | Controls whether the Ocean Controller should be deployed (it affects all resources) | `bool` | `true` | no |
| <a name="input_create_namespace"></a> [create\_namespace](#input\_create\_namespace) | Controls whether the namespace should be created if it does not exist | `bool` | `true` | no |
| <a name="input_deploy_metrics_server"></a> [deploy\_metrics\_server](#input\_deploy\_metrics\_server) | Controls whether the metrics server should be deployed | `bool` | `false` | no |
| <a name="input_disable_auto_update"></a> [disable\_auto\_update](#input\_disable\_auto\_update) | Controls whether the auto-update feature should be disabled | `bool` | `false` | no |
| <a name="input_disable_auto_update"></a> [disable\_auto\_update](#input\_disable\_auto\_update) | Controls whether the auto-update feature should be disabled | `bool` | `true` | no |
| <a name="input_disable_rightsizing"></a> [disable\_rightsizing](#input\_disable\_rightsizing) | Controls whether the rightsizing feature should be disabled | `bool` | `false` | no |
| <a name="input_enable_csr_approval"></a> [enable\_csr\_approval](#input\_enable\_csr\_approval) | Controls whether the CSR approval feature should be enabled | `bool` | `false` | no |
| <a name="input_image_pull_policy"></a> [image\_pull\_policy](#input\_image\_pull\_policy) | Specifies the image pull policy (one of: Always, Never, IfNotPresent) | `string` | `"Always"` | no |
| <a name="input_image_pull_secrets"></a> [image\_pull\_secrets](#input\_image\_pull\_secrets) | Specifies a list of references to secrets in the same namespace to use for pulling the image | `list(string)` | `[]` | no |
Expand Down
9 changes: 9 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ resource "helm_release" "ocean-kubernetes-controller" {
chart = local.chart
version = var.chart_version
repository = local.repository
wait = false

name = var.release_name
namespace = var.namespace
Expand Down Expand Up @@ -104,6 +105,14 @@ resource "helm_release" "ocean-kubernetes-controller" {
}
}

dynamic "set" {
for_each = var.disable_rightsizing != null ? [1] : []
content {
name = "spotinst.disableAutomaticRightSizing"
value = var.disable_rightsizing
}
}

dynamic "set" {
for_each = var.image_pull_secrets
content {
Expand Down
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
variable "chart_version" {
type = string
description = "Specifies the version of the Helm chart to be installed"
default = "0.1.22"
default = "0.1.31"
nullable = false
}

Expand Down Expand Up @@ -93,6 +93,12 @@ variable "enable_csr_approval" {
variable "disable_auto_update" {
type = bool
description = "Controls whether the auto-update feature should be disabled"
default = true
}

variable "disable_rightsizing" {
type = bool
description = "Controls whether the rightsizing feature should be disabled"
default = false
}

Expand Down

0 comments on commit d3b99b7

Please sign in to comment.