steampipe-plugin-openshift

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

image

OpenShift Plugin for Steampipe

Use SQL to query projects, routes, builds and more from OpenShift.

Quick start

Install

Download and install the latest OpenShift plugin:

steampipe plugin install openshift

Configure your config file.

Configure your account details in ~/.steampipe/config/openshift.spc:

connection "openshift" {
  plugin = "openshift"

  # Authentication information
  config_path = "~/.kube/config"
  config_context = "default/api-openshift-test-dq1i-p2-openshiftapps-com:6443/test"
}

Or through environment variables:

export KUBE_CONFIG=~/.kube/config

or

export KUBECONFIG=~/.kube/config

Run steampipe:

steampipe query

List your OpenShift projects:

select
  name,
  uid,
  phase,
  creation_timestamp,
  resource_version
from
  openshift_project;
+--------------------------------------------------+--------------------------------------+--------+---------------------------+------------------+
| name                                             | uid                                  | phase  | creation_timestamp        | resource_version |
+--------------------------------------------------+--------------------------------------+--------+---------------------------+------------------+
| openshift-authentication                         | cf62541e-1ad0-45f6-b023-cf695f32bffd | Active | 2023-06-05T17:45:53+05:30 | 6659             |
| openshift-apiserver                              | fb619658-fbb2-4735-87fe-386fa2897816 | Active | 2023-06-05T17:45:49+05:30 | 6650             |
| openshift-backplane-csa                          | 693ce132-49a7-4e00-b295-29de6be2fca7 | Active | 2023-06-05T18:07:01+05:30 | 30294            |
+--------------------------------------------------+--------------------------------------+--------+---------------------------+------------------+

Developing

Prerequisites:

Clone:

git clone https://github.com/turbot/steampipe-plugin-openshift.git
cd steampipe-plugin-openshift

Build, which automatically installs the new version to your ~/.steampipe/plugins directory:

make

Configure the plugin:

cp config/* ~/.steampipe/config
vi ~/.steampipe/config/openshift.spc

Try it!

steampipe query
> .inspect openshift

Further reading:

Contributing

Please see the contribution guidelines and our code of conduct. All contributions are subject to the Apache 2.0 open source license.

help wanted issues:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL