-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'flatcar-os-compatibility' into 'main'
Gitlab setup for publishing helm packages. See merge request catalystcloud/capi-helm-charts!5
- Loading branch information
Showing
7 changed files
with
174 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,37 @@ | ||
charts/*/charts | ||
Chart.lock | ||
.vscode | ||
.vscode | ||
|
||
# Created by https://www.toptal.com/developers/gitignore/api/vim,direnv,helm | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=vim,direnv,helm | ||
|
||
### direnv ### | ||
.direnv | ||
.envrc | ||
|
||
### Helm ### | ||
# Chart dependencies | ||
**/charts/**/*.tgz | ||
|
||
### Vim ### | ||
# Swap | ||
[._]*.s[a-v][a-z] | ||
!*.svg # comment out if you don't need vector files | ||
[._]*.sw[a-p] | ||
[._]s[a-rt-v][a-z] | ||
[._]ss[a-gi-z] | ||
[._]sw[a-p] | ||
|
||
# Session | ||
Session.vim | ||
Sessionx.vim | ||
|
||
# Temporary | ||
.netrwhist | ||
*~ | ||
# Auto-generated tag files | ||
tags | ||
# Persistent undo | ||
[._]*.un~ | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/vim,direnv,helm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
include: | ||
- remote: https://gitlab.int.catalystcloud.nz/catalystcloud/gitlab-build-tools/raw/main/templates/docker-setup.gitlab-ci.yml | ||
|
||
stages: | ||
- template | ||
- package | ||
- publish | ||
|
||
.helm_publish_jobs: | ||
image: gitlab.int.catalystcloud.nz:4567/catalystcloud/helm-environment:20230606T015011Z | ||
before_script: | ||
- cd ${CI_PROJECT_DIR}/charts/openstack-cluster | ||
- export CHART_VERSION=$(git describe --tags) | ||
rules: | ||
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_NAME =~ /^\d+\.\d+\.\d+.*$/ | ||
|
||
|
||
helm_package: | ||
extends: .helm_publish_jobs | ||
stage: package | ||
script: | ||
- helm dependency build ${CI_PROJECT_DIR}/charts/openstack-cluster | ||
- helm package --app-version $(git describe --always) --version ${CHART_VERSION} ${CI_PROJECT_DIR}/charts/openstack-cluster | ||
artifacts: | ||
paths: | ||
- "${CI_PROJECT_DIR}/charts/openstack-cluster/openstack-cluster-*.tgz" | ||
|
||
.publish_chart: | ||
extends: .helm_publish_jobs | ||
stage: publish | ||
script: | ||
# NOTE(travis) push to both gitlab helm repo and OCI for now. Since OCI has no search function it might be useful | ||
# to have a place to browse packages. | ||
- > | ||
curl --request POST | ||
--form chart=@${CI_PROJECT_DIR}/charts/openstack-cluster/openstack-cluster-${CHART_VERSION}.tgz | ||
--user gitlab-ci-token:${CI_JOB_TOKEN} | ||
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/${HELM_CHANNEL}/charts | ||
- > | ||
helm push | ||
${CI_PROJECT_DIR}/charts/openstack-cluster/openstack-cluster-${CHART_VERSION}.tgz oci://internal.oci-registry.nz-por-1.catalystcloud.nz/v2/openstack-cluster/${HELM_CHANNEL} | ||
dependencies: | ||
- helm_package | ||
# NOTE(travis) Alternately publish chart to "dev" or "stable" channel depending if commit tag is on the default branch. | ||
publish_chart_dev: | ||
extends: .publish_chart | ||
variables: | ||
HELM_CHANNEL: dev | ||
rules: | ||
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_COMMIT_REF_NAME =~ /^\d+\.\d+\.\d+.*$/ | ||
|
||
|
||
publish_chart_prod: | ||
extends: .publish_chart | ||
rules: | ||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_REF_NAME =~ /^\d+\.\d+\.\d+.*$/ | ||
variables: | ||
HELM_CHANNEL: stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,27 @@ cloudName: openstack | |
# This should match the version of kubelet and kubeadm in the image | ||
kubernetesVersion: | ||
|
||
# WARN(travis) Flatcar based images | ||
flatcarOS: false | ||
flatcarContainerLinuxConfig: | ||
format: ignition | ||
ignition: | ||
containerLinuxConfig: | ||
additionalConfig: | | ||
systemd: | ||
units: | ||
- name: [email protected] | ||
enabled: true | ||
- name: kubeadm.service | ||
enabled: true | ||
dropins: | ||
- name: 10-flatcar.conf | ||
contents: | | ||
[Unit] | ||
Requires=containerd.service coreos-metadata.service | ||
After=containerd.service coreos-metadata.service | ||
[Service] | ||
EnvironmentFile=/run/metadata/flatcar | ||
# The name of the image to use for cluster machines | ||
machineImage: | ||
# OR | ||
|
@@ -34,7 +55,7 @@ machineImageId: | |
machineSSHKeyName: | ||
|
||
# The prefix used for project labels and annotations | ||
projectPrefix: capi.stackhpc.com | ||
projectPrefix: capi.catalystcloud.nz | ||
|
||
# Any extra annotations to add to the cluster | ||
clusterAnnotations: {} | ||
|
@@ -170,6 +191,7 @@ controlPlane: | |
# etcd metrics, controller-manager, scheduler and kube-proxy to 0.0.0.0 so that Prometheus | ||
# can reach them to collect metrics | ||
clusterConfiguration: | ||
imageRepository: oci-registry.catalystcloud.nz | ||
etcd: | ||
local: | ||
extraArgs: | ||
|