# Add conditional statusInformers to kots application

**URL:** https://community.replicated.com/t/add-conditional-statusinformers-to-kots-application/1278
**Category:** How do I?
**Tags:** kots
**Created:** [August 15, 2023, 3:51pm UTC](https://community.replicated.com/t/add-conditional-statusinformers-to-kots-application/1278 "2023-08-15T15:51:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![anyweez](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/anyweez/32/544_2.png) [@anyweez](https://community.replicated.com/u/anyweez)
#### Post date: [August 15, 2023, 3:51pm UTC](https://community.replicated.com/t/add-conditional-statusinformers-to-kots-application/1278/1 "2023-08-15T15:51:48Z")

</div>

Currently we have some status informers set up that let users know when their installation is complete and our application is live. We’d like to add some status informers that are used in some installations and not in others, depending on (1) the value of certain license fields that we set, and (2) the value of certain ConfigOptions that users specify during installation.

Example:

```yaml
apiVersion: kots.io/v1beta1
kind: Application
metadata:
  name: our-app
spec:
  statusInformers:
    - deployment/deployment-a
    - deployment/deployment-b
    - deployment/deployment-c # make this only happen if a certain license field value or ConfigOption is set

```

How would we add the `deployment-c` case conditionally as described above?

---

<div class="post-metadata">

### Author: ![salahalsaleh](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/salahalsaleh/32/464_2.png) [@salahalsaleh](https://community.replicated.com/u/salahalsaleh)
#### Post date: [August 18, 2023, 4:16pm UTC](https://community.replicated.com/t/add-conditional-statusinformers-to-kots-application/1278/2 "2023-08-18T16:16:48Z")

</div>

Hi Luke,

Conditional status informers are supported via template functions. If a template function evaluates to an empty string, the status informer is excluded. For example:

```auto
statusInformers:
  - deployment/deployment-a
  - deployment/deployment-b
  - '{{repl if ConfigOptionEquals "option" "value"}}deployment/deployment-c{{repl else}}{{repl end}}'

```

In the example above, the `deployment/deployment-c` status informer is excluded unless the statement in the `ConfigOptionEquals` template function evaluates to true.

Reference: [https://docs.replicated.com/vendor/admin-console-display-app-status#examples](https://docs.replicated.com/vendor/admin-console-display-app-status#examples)

Hope that helps.

Salah Al Saleh  
Senior Software Engineer @ Replicated
