Skip to content

Commit

Permalink
Sections in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Jun 2, 2022
1 parent 2c5a310 commit 489855e
Showing 1 changed file with 67 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
title: odo describe binding
---

`odo describe binding` command is useful for getting information about a service binding.
## Description

`odo describe binding` command is useful for getting information about service bindings.

This command supports the service bindings added with the command `odo add binding` and bindings added manually to the Devfile, using a `ServiceBinding` resource from one of these apiVersion:
- `binding.operators.coreos.com/v1alpha1`
- `servicebinding.io/v1alpha3`

## Running the Command

There are 2 ways to describe a service binding:
- [Describe with access to Devfile](#describe-with-access-to-devfile)
- [Describe without access to Devfile](#describe-without-access-to-devfile)

## Describe with access to Devfile

```shell
odo describe binding
```
### Describe with access to Devfile

This command returns information extracted from the Devfile and, if possible, from the cluster.

Expand All @@ -31,9 +31,68 @@ For each of these resources, the following information is displayed:
- if the variables are bound as files or as environment variables,
- if the binding information is auto-detected.

If the resources have been deployed to the cluster, the command also extracts information from the status of the resources to display information about the variables that can be used from the component.
When the service binding are not deployed yet to the cluster:

```shell
$ odo describe binding
ServiceBinding used by the current component:

Service Binding Name: my-nodejs-app-cluster-sample
Services:
• cluster-sample (Cluster.postgresql.k8s.enterprisedb.io)
Bind as files: false
Detect binding resources: true
Available binding information: unknown

Service Binding Name: my-nodejs-app-redis-standalone
Services:
• redis-standalone (Redis.redis.redis.opstreelabs.in)
Bind as files: false
Detect binding resources: true
Available binding information: unknown

Binding information for one or more ServiceBinding is not available because they don't exist on the cluster yet.
Start "odo dev" first to see binding information.
```
When the resources have been deployed to the cluster, the command also extracts information from the status of the resources to display information about the variables that can be used from the component.
```shell
$ odo describe binding
ServiceBinding used by the current component:
Service Binding Name: my-nodejs-app-cluster-sample-2
Services:
• cluster-sample-2 (Cluster.postgresql.k8s.enterprisedb.io)
Bind as files: false
Detect binding resources: true
Available binding information:
• CLUSTER_PASSWORD
• CLUSTER_PROVIDER
• CLUSTER_TLS.CRT
• CLUSTER_TLS.KEY
• CLUSTER_USERNAME
• CLUSTER_CA.KEY
• CLUSTER_CLUSTERIP
• CLUSTER_HOST
• CLUSTER_PGPASS
• CLUSTER_TYPE
• CLUSTER_CA.CRT
• CLUSTER_DATABASE
Service Binding Name: my-nodejs-app-redis-standalone
Services:
• redis-standalone (Redis.redis.redis.opstreelabs.in)
Bind as files: false
Detect binding resources: true
Available binding information:
• REDIS_CLUSTERIP
• REDIS_HOST
• REDIS_PASSWORD
• REDIS_TYPE
```
## Describe without access to Devfile
### Describe without access to Devfile
```shell
odo describe binding --name <component_name>
Expand Down

0 comments on commit 489855e

Please sign in to comment.