Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] support customer kubeconfig #151

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
prometheus_operator_version: v0.12.0
grafana_enable: ${{matrix.GRAFANA_ENABLE}}
tekton_enable: ${{matrix.TEKTON_ENABLE}}
kubeconfig_root_dir: /tmp/kubeconfig
- name: verify
run: |
./verify.sh cluster
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/testEdge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,29 @@ jobs:
- name: verify
run: |
./verify.sh cluster
test_cutsomer_cluster_with_cutsomer_config_file:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# set up k8s cluster
- uses: ./
name: dummy cluster for test
with:
cluster_provider: kind
config_cluster: false
# customer config file
- name: verify
run: |
mv /tmp/kubeconfig /tmp/testconfig
# config cluster
- uses: ./
name: config cluster
with:
cluster_provider: existing
prometheus_enable: true
tekton_enable: true
kubeconfig_root_dir: /tmp/testconfig
- name: verify
run: |
mv /tmp/testconfig /tmp/kubeconfig
./verify.sh cluster
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ You can now consume the action by referencing the main branch
prometheus_enable: true
tekton_enable: true
grafana_enable: true
kubeconfig_root_dir: /tmp/kubeconfig

- name: error handle
if: ${{ failure() }}
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ inputs:
tekton_enable:
description: enable tekton for kepler CI
required: false
kubeconfig_root_dir:
description: kubeconfig_root_dir for k8s cluster
required: false
kind_version:
description: kind version for kepler CI
required: false
Expand Down
3 changes: 2 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ async function configcluster() {
const prometheus_operator_version = getInputOrDefault('prometheus_operator_version', '');
const grafana_enable = getInputOrDefault('grafana_enable', '');
const tekton_enable = getInputOrDefault('tekton_enable', '');
let parameterExport = "export KUBECONFIG_ROOT_DIR=/tmp/kubeconfig"
const kubeconfig_root_dir = getInputOrDefault('kubeconfig_root_dir', '/tmp/kubeconfig');
let parameterExport = "export KUBECONFIG_ROOT_DIR="+kubeconfig_root_dir;
if (prometheus_enable.length !== 0) {
core.info(`use prometheus enable `+prometheus_enable);
parameterExport = parameterExport + " && export PROMETHEUS_ENABLE="+prometheus_enable;
Expand Down
Loading