Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special Scope Environment Variables #335

Merged
merged 1 commit into from
Dec 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions modules/ROOT/pages/deployment/services/env-vars-special-scope.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
= Environment Variables with Special Scopes
:toc: right

// there is only an adoc table to include but no yaml file. this is only when using special scope envvars.
:no_yaml: true

:description: Some environment variables have an extended or global scope. Variables with extended scope do not directly configure services but function underneath. Variables with a global scope can configure more than one service.

== Introduction

{description}

Examples:

// * The global environment variable `OCIS_LOG_LEVEL` is available in multiple services.
* The extended environment variable `OCIS_CONFIG_DIR` can be used with `ocis init`.

== Extended Environment Variables

:ext_name: extended

include::partial$deployment/services/env-and-yaml.adoc[]

// prepared but not available for now
////
== Global Environment Variables

:ext_name: global

include::partial$deployment/services/env-and-yaml.adoc[]
////
16 changes: 16 additions & 0 deletions modules/ROOT/partials/deployment/services/env-and-yaml.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
// the attribute ext_name (mandatory) and no_yaml (not mandatory) will be handed over by the calling page.
// if no_yaml is set, it will exclude rendering yaml files because it does not exist.

// print a dependent explanation line
// no_yaml is not set = standard extension,
// no_yaml is set = special scope envvars

ifndef::no_yaml[]
=== Environment Variables

The `{ext_name}` service is configured via the following environment variables:
endif::[]

ifdef::no_yaml[]
The `{ext_name}` variables are defined in the following way:
endif::[]

[tabs]
====
Expand Down Expand Up @@ -33,6 +46,8 @@ endif::[]
endif::[]
====

ifndef::no_yaml[]

=== YAML Example

[tabs]
Expand Down Expand Up @@ -75,3 +90,4 @@ endif::[]
endif::[]
====

endif::[]
3 changes: 2 additions & 1 deletion modules/ROOT/partials/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
*** xref:deployment/nfs/nfs.adoc[Network File System Deployment]
*** xref:deployment/services/services.adoc[Services]
**** General Information
***** xref:deployment/services/env-var-note.adoc[Environment Variable Notes]
***** xref:deployment/services/deployment-considerations.adoc[Deployment Considerations]
***** xref:deployment/services/env-var-note.adoc[Environment Variable Notes]
***** xref:deployment/services/env-vars-special-scope.adoc[Environment Variables with Special Scope]
***** xref:deployment/services/gateways.adoc[Gateways]
***** xref:deployment/services/logging.adoc[Logging]
***** xref:deployment/services/ports-used.adoc[Ports Used]
Expand Down