Skip to content

Commit

Permalink
Merge pull request #986 from RedHatInsights/psav/added_hostname_to_cd…
Browse files Browse the repository at this point in the history
…appconfig

feat(web): Added hostname to cdappconfig
  • Loading branch information
psav authored Jun 7, 2024
2 parents 39c1637 + df21133 commit 73cf82d
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 11 deletions.
4 changes: 4 additions & 0 deletions controllers/cloud.redhat.com/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"hashCache": {
"description": "A set of configMap/secret hashes",
"type": "string"
},
"hostname": {
"description": "The external hostname of the deployment, where applicable",
"type": "string"
}
},
"required": [
Expand Down
3 changes: 3 additions & 0 deletions controllers/cloud.redhat.com/config/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -264,16 +264,16 @@ func makeLocalFeatureFlags(o obj.ClowdObject, objMap providers.ObjectMap, _ bool

livenessProbe := core.Probe{
ProbeHandler: probeHandler,
InitialDelaySeconds: 10,
TimeoutSeconds: 2,
InitialDelaySeconds: 20,
TimeoutSeconds: 4,
PeriodSeconds: 10,
SuccessThreshold: 1,
FailureThreshold: 3,
}
readinessProbe := core.Probe{
ProbeHandler: probeHandler,
InitialDelaySeconds: 20,
TimeoutSeconds: 2,
InitialDelaySeconds: 40,
TimeoutSeconds: 4,
PeriodSeconds: 10,
SuccessThreshold: 1,
FailureThreshold: 3,
Expand Down
2 changes: 2 additions & 0 deletions controllers/cloud.redhat.com/providers/web/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ func (web *localWebProvider) Provide(app *crd.ClowdApp) error {

web.Config.WebPort = utils.IntPtr(int(web.Env.Spec.Providers.Web.Port))
web.Config.PublicPort = utils.IntPtr(int(web.Env.Spec.Providers.Web.Port))
web.Config.Hostname = &web.Env.Status.Hostname

privatePort := web.Env.Spec.Providers.Web.PrivatePort
if privatePort == 0 {
privatePort = 10000
Expand Down
16 changes: 16 additions & 0 deletions docs/appconfig/schema-definitions-appconfig-properties-hostname.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Untitled string in AppConfig Schema

```txt
https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/AppConfig/properties/hostname
```

The external hostname of the deployment, where applicable


| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------- |
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [schema.json\*](../../out/schema.json "open original schema") |

## hostname Type

`string`
17 changes: 17 additions & 0 deletions docs/appconfig/schema-definitions-appconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ClowdApp deployment configuration for Clowder enabled apps.
| [privateEndpoints](#privateendpoints) | `array` | Optional | cannot be null | [AppConfig](schema-definitions-appconfig-properties-privateendpoints.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/AppConfig/properties/privateEndpoints") |
| [BOPURL](#bopurl) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-appconfig-properties-bopurl.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/AppConfig/properties/BOPURL") |
| [hashCache](#hashcache) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-appconfig-properties-hashcache.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/AppConfig/properties/hashCache") |
| [hostname](#hostname) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-appconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/AppConfig/properties/hostname") |

## privatePort

Expand Down Expand Up @@ -308,3 +309,19 @@ A set of configMap/secret hashes
### hashCache Type

`string`

## hostname

The external hostname of the deployment, where applicable


`hostname`

- is optional
- Type: `string`
- cannot be null
- defined in: [AppConfig](schema-definitions-appconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/AppConfig/properties/hostname")

### hostname Type

`string`
31 changes: 24 additions & 7 deletions docs/appconfig/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Reference this group by using
| [privateEndpoints](#privateendpoints) | `array` | Optional | cannot be null | [AppConfig](schema-definitions-appconfig-properties-privateendpoints.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/AppConfig/properties/privateEndpoints") |
| [BOPURL](#bopurl) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-appconfig-properties-bopurl.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/AppConfig/properties/BOPURL") |
| [hashCache](#hashcache) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-appconfig-properties-hashcache.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/AppConfig/properties/hashCache") |
| [hostname](#hostname) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-appconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/AppConfig/properties/hostname") |

### privatePort

Expand Down Expand Up @@ -317,6 +318,22 @@ A set of configMap/secret hashes

`string`

### hostname

The external hostname of the deployment, where applicable


`hostname`

- is optional
- Type: `string`
- cannot be null
- defined in: [AppConfig](schema-definitions-appconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/AppConfig/properties/hostname")

#### hostname Type

`string`

## Definitions group LoggingConfig

Reference this group by using
Expand Down Expand Up @@ -682,7 +699,7 @@ Reference this group by using

| Property | Type | Required | Nullable | Defined by |
| :-------------------------------------- | --------- | -------- | -------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [hostname](#hostname) | `string` | Required | cannot be null | [AppConfig](schema-definitions-brokerconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/BrokerConfig/properties/hostname") |
| [hostname](#hostname-1) | `string` | Required | cannot be null | [AppConfig](schema-definitions-brokerconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/BrokerConfig/properties/hostname") |
| [port](#port) | `integer` | Optional | cannot be null | [AppConfig](schema-definitions-brokerconfig-properties-port.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/BrokerConfig/properties/port") |
| [cacert](#cacert) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-brokerconfig-properties-cacert.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/BrokerConfig/properties/cacert") |
| [authtype](#authtype) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-brokerconfig-properties-authtype.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/BrokerConfig/properties/authtype") |
Expand Down Expand Up @@ -851,7 +868,7 @@ Reference this group by using
| [name](#name-3) | `string` | Required | cannot be null | [AppConfig](schema-definitions-databaseconfig-properties-name.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DatabaseConfig/properties/name") |
| [username](#username-1) | `string` | Required | cannot be null | [AppConfig](schema-definitions-databaseconfig-properties-username.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DatabaseConfig/properties/username") |
| [password](#password-1) | `string` | Required | cannot be null | [AppConfig](schema-definitions-databaseconfig-properties-password.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DatabaseConfig/properties/password") |
| [hostname](#hostname-1) | `string` | Required | cannot be null | [AppConfig](schema-definitions-databaseconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DatabaseConfig/properties/hostname") |
| [hostname](#hostname-2) | `string` | Required | cannot be null | [AppConfig](schema-definitions-databaseconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DatabaseConfig/properties/hostname") |
| [port](#port-1) | `integer` | Required | cannot be null | [AppConfig](schema-definitions-databaseconfig-properties-port.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DatabaseConfig/properties/port") |
| [adminUsername](#adminusername) | `string` | Required | cannot be null | [AppConfig](schema-definitions-databaseconfig-properties-adminusername.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DatabaseConfig/properties/adminUsername") |
| [adminPassword](#adminpassword) | `string` | Required | cannot be null | [AppConfig](schema-definitions-databaseconfig-properties-adminpassword.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DatabaseConfig/properties/adminPassword") |
Expand Down Expand Up @@ -1145,7 +1162,7 @@ Reference this group by using
| [buckets](#buckets) | `array` | Optional | cannot be null | [AppConfig](schema-definitions-objectstoreconfig-properties-buckets.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/ObjectStoreConfig/properties/buckets") |
| [accessKey](#accesskey-1) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-objectstoreconfig-properties-accesskey.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/ObjectStoreConfig/properties/accessKey") |
| [secretKey](#secretkey-1) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-objectstoreconfig-properties-secretkey.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/ObjectStoreConfig/properties/secretKey") |
| [hostname](#hostname-2) | `string` | Required | cannot be null | [AppConfig](schema-definitions-objectstoreconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/ObjectStoreConfig/properties/hostname") |
| [hostname](#hostname-3) | `string` | Required | cannot be null | [AppConfig](schema-definitions-objectstoreconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/ObjectStoreConfig/properties/hostname") |
| [port](#port-2) | `integer` | Required | cannot be null | [AppConfig](schema-definitions-objectstoreconfig-properties-port.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/ObjectStoreConfig/properties/port") |
| [tls](#tls-1) | `boolean` | Required | cannot be null | [AppConfig](schema-definitions-objectstoreconfig-properties-tls.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/ObjectStoreConfig/properties/tls") |

Expand Down Expand Up @@ -1255,7 +1272,7 @@ Reference this group by using

| Property | Type | Required | Nullable | Defined by |
| :-------------------------------------- | --------- | -------- | -------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [hostname](#hostname-3) | `string` | Required | cannot be null | [AppConfig](schema-definitions-featureflagsconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/FeatureFlagsConfig/properties/hostname") |
| [hostname](#hostname-4) | `string` | Required | cannot be null | [AppConfig](schema-definitions-featureflagsconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/FeatureFlagsConfig/properties/hostname") |
| [port](#port-3) | `integer` | Required | cannot be null | [AppConfig](schema-definitions-featureflagsconfig-properties-port.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/FeatureFlagsConfig/properties/port") |
| [clientAccessToken](#clientaccesstoken) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-featureflagsconfig-properties-clientaccesstoken.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/FeatureFlagsConfig/properties/clientAccessToken") |
| [scheme](#scheme) | `string` | Required | cannot be null | [AppConfig](schema-definitions-featureflagsconfig-properties-scheme.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/FeatureFlagsConfig/properties/scheme") |
Expand Down Expand Up @@ -1343,7 +1360,7 @@ Reference this group by using

| Property | Type | Required | Nullable | Defined by |
| :---------------------- | --------- | -------- | -------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [hostname](#hostname-4) | `string` | Required | cannot be null | [AppConfig](schema-definitions-inmemorydbconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/InMemoryDBConfig/properties/hostname") |
| [hostname](#hostname-5) | `string` | Required | cannot be null | [AppConfig](schema-definitions-inmemorydbconfig-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/InMemoryDBConfig/properties/hostname") |
| [port](#port-4) | `integer` | Required | cannot be null | [AppConfig](schema-definitions-inmemorydbconfig-properties-port.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/InMemoryDBConfig/properties/port") |
| [username](#username-2) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-inmemorydbconfig-properties-username.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/InMemoryDBConfig/properties/username") |
| [password](#password-2) | `string` | Optional | cannot be null | [AppConfig](schema-definitions-inmemorydbconfig-properties-password.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/InMemoryDBConfig/properties/password") |
Expand Down Expand Up @@ -1440,7 +1457,7 @@ Reference this group by using
| Property | Type | Required | Nullable | Defined by |
| :---------------------- | --------- | -------- | -------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [name](#name-5) | `string` | Required | cannot be null | [AppConfig](schema-definitions-dependencyendpoint-properties-name.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DependencyEndpoint/properties/name") |
| [hostname](#hostname-5) | `string` | Required | cannot be null | [AppConfig](schema-definitions-dependencyendpoint-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DependencyEndpoint/properties/hostname") |
| [hostname](#hostname-6) | `string` | Required | cannot be null | [AppConfig](schema-definitions-dependencyendpoint-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DependencyEndpoint/properties/hostname") |
| [port](#port-5) | `integer` | Required | cannot be null | [AppConfig](schema-definitions-dependencyendpoint-properties-port.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DependencyEndpoint/properties/port") |
| [app](#app) | `string` | Required | cannot be null | [AppConfig](schema-definitions-dependencyendpoint-properties-app.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DependencyEndpoint/properties/app") |
| [tlsPort](#tlsport) | `integer` | Optional | cannot be null | [AppConfig](schema-definitions-dependencyendpoint-properties-tlsport.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/DependencyEndpoint/properties/tlsPort") |
Expand Down Expand Up @@ -1570,7 +1587,7 @@ Reference this group by using
| Property | Type | Required | Nullable | Defined by |
| :---------------------- | --------- | -------- | -------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [name](#name-6) | `string` | Required | cannot be null | [AppConfig](schema-definitions-privatedependencyendpoint-properties-name.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/PrivateDependencyEndpoint/properties/name") |
| [hostname](#hostname-6) | `string` | Required | cannot be null | [AppConfig](schema-definitions-privatedependencyendpoint-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/PrivateDependencyEndpoint/properties/hostname") |
| [hostname](#hostname-7) | `string` | Required | cannot be null | [AppConfig](schema-definitions-privatedependencyendpoint-properties-hostname.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/PrivateDependencyEndpoint/properties/hostname") |
| [port](#port-6) | `integer` | Required | cannot be null | [AppConfig](schema-definitions-privatedependencyendpoint-properties-port.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/PrivateDependencyEndpoint/properties/port") |
| [app](#app-1) | `string` | Required | cannot be null | [AppConfig](schema-definitions-privatedependencyendpoint-properties-app.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/PrivateDependencyEndpoint/properties/app") |
| [tlsPort](#tlsport-1) | `integer` | Optional | cannot be null | [AppConfig](schema-definitions-privatedependencyendpoint-properties-tlsport.md "https://cloud.redhat.com/schemas/clowder-appconfig#/definitions/PrivateDependencyEndpoint/properties/tlsPort") |
Expand Down
Loading

0 comments on commit 73cf82d

Please sign in to comment.