Skip to content

Commit

Permalink
feat(cmx): cluster port expose wildcards
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed May 10, 2024
1 parent 2f01e36 commit a4d9465
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion create-cluster/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function run() {
const tags = core.getInput('tags');
const apiEndpoint = core.getInput('replicated-api-endpoint')
let kubeconfigPath = core.getInput('kubeconfig-path');
const exportKubeconfig = core.getInput('export-kubeconfig') === 'true';
const exportKubeconfig = core.getBooleanInput('export-kubeconfig');

const apiClient = new VendorPortalApi();
apiClient.apiToken = apiToken;
Expand Down
6 changes: 1 addition & 5 deletions create-customer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ async function run() {
const apiEndpoint = core.getInput('replicated-api-endpoint')
const expiresInDays: number = +(core.getInput('expires-in') || 0);
const entitlements = core.getInput('entitlements');

let isKotsInstallEnabled: boolean | undefined = undefined;
if (core.getInput('is-kots-install-enabled') !== '') {
isKotsInstallEnabled = core.getInput('is-kots-install-enabled') === 'true';
}
const isKotsInstallEnabled = core.getBooleanInput('is-kots-install-enabled');

const apiClient = new VendorPortalApi();
apiClient.apiToken = apiToken;
Expand Down
4 changes: 4 additions & 0 deletions expose-port/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ inputs:
description: "Protocols to expose port for. Default is `https`. Possible values are `http`, `https`, `http,https`."
required: false
default: "https"
wildcard:
description: "Create a wildcard DNS entry and TLS certificate for this port (will take extra time to provision)."
required: false
default: "false"
outputs:
hostname: # hostname of the exposed port
description: "Contains the hostname of the exposed port."
Expand Down
4 changes: 3 additions & 1 deletion expose-port/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ async function run() {
const port = core.getInput("port");
const protocols = core.getInput("protocols").split(",");
const apiEndpoint = core.getInput("replicated-api-endpoint");
const isWildcard = core.getBooleanInput("wildcard");

const apiClient = new VendorPortalApi();
apiClient.apiToken = apiToken;
Expand All @@ -20,7 +21,8 @@ async function run() {
apiClient,
clusterId,
Number(port),
protocols
protocols,
isWildcard
);
core.info(`Exposed Port on ${exposedPort.hostname}`);
core.setOutput("hostname", exposedPort.hostname);
Expand Down
2 changes: 1 addition & 1 deletion helm-install/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function run() {
const namespace: string = core.getInput('namespace');
const registryUsername: string = core.getInput('registry-username');
const registryPassword: string = core.getInput('registry-password');
const runPreflights: boolean = core.getInput('run-preflights') === 'true';
const runPreflights: boolean = core.getBooleanInput('run-preflights');
const values: string = core.getInput('values');
const repoName: string = core.getInput('repo-name');
const repoUrl: string = core.getInput('repo-url');
Expand Down
2 changes: 1 addition & 1 deletion report-compatibility-result/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function run() {
const apiEndpoint = core.getInput('replicated-api-endpoint')
const k8sDistribution = core.getInput('kubernetes-distribution');
const k8sVersion = core.getInput('kubernetes-version');
const success = core.getInput('success') === 'true';
const success = core.getBooleanInput('success');
const notes = core.getInput('notes');

const apiClient = new VendorPortalApi();
Expand Down
2 changes: 1 addition & 1 deletion upgrade-cluster/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async function run() {
const timeoutMinutes: number = +(core.getInput('timeout-minutes') || 20);
const apiEndpoint = core.getInput('replicated-api-endpoint')
let kubeconfigPath = core.getInput('kubeconfig-path');
const exportKubeconfig = core.getInput('export-kubeconfig') === 'true';
const exportKubeconfig = core.getBooleanInput('export-kubeconfig');

const apiClient = new VendorPortalApi();
apiClient.apiToken = apiToken;
Expand Down

0 comments on commit a4d9465

Please sign in to comment.