Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

janmedrek/one-click-integration-script

Repository files navigation

one-click-script

This script aims at resolving issues with one-click-integration in Kyma's certificate retrieval flow.

The script requires only minimal input and automates token fetch, csr generation and http calls to the Connector Service.

Requirements

In order to run the script following command line tools must be available:

  • curl
  • openssl
  • jq
  • base64
  • kubectl

Installation

Brew

Script now has a brew formula! Simply run:

brew tap janmedrek/one-click-integration
brew install one-click-integration

After the installation it's accessible via:

one-click-integration.sh

No need to remember where you've put that pesky file anymore!

Curl

Otherwise you can set up the script with the following command:

curl https://raw.githubusercontent.com/janmedrek/one-click-integration-script/master/one-click-integration.sh > one-click-integration.sh && chmod +x ./one-click-integration.sh

Usage

This script can fetch certificate info in two different ways:

  • using provided url (containing token)
  • using kubeconfig file

Please not that the options are mutually exclusive!

Following parameters are available:

  • url fetch:
    • -u | --url - url with a token generated by connector-service
    • -k | --key - (optional) path to the key file
  • kubeconfig fetch:
    • -c | --config - path to the kubeconfig file
    • -r | --remoteenv - name of remote environment

Examples

url fetch

  • No key file provided:
one-click-integration.sh --url "https://connector-service.kyma.dev.com/v1/remoteenvironments/ec-default/info?token=J0RpZCBoZSBmaXJlIHNpeCBzaG90cyBvciBvbmx5IGZpdmUnPyBXZWxsIHRvIHRlbGwgeW91IHRoZSB0cnV0aCwgaW4gYWxsIHRoaXMgZXhjaXRlbWVudCwgaSBraW5kIG9mIGxvc3QgdHJhY2sgbXlzZWxmLg=="
  • Using existing key file:
one-click-integration.sh --key certificate.key --url "https://connector-service.kyma.dev.com/v1/remoteenvironments/ec-default/info?token=QnV0IGJlaW5nIHRoYXQgdGhpcyBpcyBhIC40NCBNYWdudW0sIHRoZSBtb3N0IHBvd2VyZnVsIGhhbmRndW4gaW4gdGhlIHdvcmxkLCBhbmQgd291bGQgYmxvdyB5b3VyIGhlYWQgY2xlYW4gb2ZmLCB5b3UndmUgZ290IHRvIGFzayB5b3Vyc2VsZiBvbmUgcXVlc3Rpb246ICdEbyBJIGZlZWwgbHVja3k/JyBXZWxsIGRvIHlhLCBwdW5rPw=="

kubeconfig fetch

  • No key file provided:
one-click-integration.sh --config "/Users/username/kubeconfigdir/kubeconfig" -r "re-name"
  • Using existing key file:
one-click-integration.sh --config "/Users/username/kubeconfigdir/kubeconfig" -r "re-name" --key certificate.key

Auto-completion

There is a nice auto-completion script which can be added for increasing the user experience: Auto-completion for one-click-integration.

Simply add the following command to your profile script:

source ./one-click-integration-script-completion.bash

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages