EnvironmentDetails#

pydantic model phalanx.models.environments.EnvironmentDetails#

Full details about an environment, including auth and Argo CD.

Used primarily for documentation generation, which needs details from the Argo CD and Gafaelfawr configurations for that environment. Use EnvironmentConfig instead when only the basic environment configuration is needed.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "EnvironmentDetails",
   "description": "Full details about an environment, including auth and Argo CD.\n\nUsed primarily for documentation generation, which needs details from the\nArgo CD and Gafaelfawr configurations for that environment.  Use\n`EnvironmentConfig` instead when only the basic environment configuration\nis needed.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "fqdn": {
         "title": "Fqdn",
         "type": "string"
      },
      "vaultUrl": {
         "title": "Vaulturl",
         "type": "string"
      },
      "vaultPathPrefix": {
         "title": "Vaultpathprefix",
         "type": "string"
      },
      "applications": {
         "title": "Applications",
         "type": "array",
         "items": {
            "$ref": "#/definitions/Application"
         }
      },
      "argocdUrl": {
         "title": "Argocdurl",
         "type": "string"
      },
      "argocdRbac": {
         "title": "Argocdrbac",
         "type": "array",
         "items": {
            "type": "array",
            "items": {
               "type": "string"
            }
         }
      },
      "identityProvider": {
         "$ref": "#/definitions/IdentityProvider"
      },
      "gafaelfawrScopes": {
         "title": "Gafaelfawrscopes",
         "type": "array",
         "items": {
            "$ref": "#/definitions/GafaelfawrScope"
         }
      }
   },
   "required": [
      "name",
      "fqdn",
      "vaultUrl",
      "vaultPathPrefix",
      "applications",
      "argocdRbac",
      "identityProvider",
      "gafaelfawrScopes"
   ],
   "definitions": {
      "DocLink": {
         "title": "DocLink",
         "description": "A documentation link for an application.\n\nThis represents an individual array item in the ``phalanx.lsst.io/docs``\nHelm chart annotation in :file:`Chart.yaml`.",
         "type": "object",
         "properties": {
            "url": {
               "title": "Url",
               "type": "string"
            },
            "title": {
               "title": "Title",
               "type": "string"
            },
            "id": {
               "title": "Id",
               "type": "string"
            }
         },
         "required": [
            "url",
            "title"
         ]
      },
      "ConditionalSecretCopyRules": {
         "title": "ConditionalSecretCopyRules",
         "description": "Possibly conditional rules for copying a secret value from another.",
         "type": "object",
         "properties": {
            "if": {
               "title": "Condition",
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "type": "string"
            },
            "application": {
               "title": "Application",
               "type": "string"
            },
            "key": {
               "title": "Key",
               "type": "string"
            }
         },
         "required": [
            "application",
            "key"
         ],
         "additionalProperties": false
      },
      "ConditionalSimpleSecretGenerateRules": {
         "title": "ConditionalSimpleSecretGenerateRules",
         "description": "Conditional rules for generating a secret value with no source.",
         "type": "object",
         "properties": {
            "if": {
               "title": "Condition",
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "type": "string"
            },
            "type": {
               "title": "Type",
               "enum": [
                  "password",
                  "gafaelfawr-token",
                  "fernet-key",
                  "rsa-private-key"
               ],
               "type": "string"
            }
         },
         "required": [
            "type"
         ],
         "additionalProperties": false
      },
      "ConditionalSourceSecretGenerateRules": {
         "title": "ConditionalSourceSecretGenerateRules",
         "description": "Conditional rules for generating a secret from another secret.",
         "type": "object",
         "properties": {
            "if": {
               "title": "Condition",
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "type": "string"
            },
            "type": {
               "title": "Type",
               "enum": [
                  "bcrypt-password-hash",
                  "mtime"
               ],
               "type": "string"
            },
            "source": {
               "title": "Source",
               "type": "string"
            }
         },
         "required": [
            "type",
            "source"
         ]
      },
      "ConditionalSecretConfig": {
         "title": "ConditionalSecretConfig",
         "description": "Possibly conditional specification for an application secret.",
         "type": "object",
         "properties": {
            "if": {
               "title": "Condition",
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "copy": {
               "title": "Copy",
               "description": "Rules for where the secret should be copied from",
               "allOf": [
                  {
                     "$ref": "#/definitions/ConditionalSecretCopyRules"
                  }
               ]
            },
            "generate": {
               "title": "Generate",
               "anyOf": [
                  {
                     "$ref": "#/definitions/ConditionalSimpleSecretGenerateRules"
                  },
                  {
                     "$ref": "#/definitions/ConditionalSourceSecretGenerateRules"
                  }
               ]
            },
            "value": {
               "title": "Value",
               "type": "string",
               "writeOnly": true,
               "format": "password"
            }
         },
         "required": [
            "description"
         ],
         "additionalProperties": false
      },
      "Application": {
         "title": "Application",
         "description": "A Phalanx application that knows which environments use it.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "namespace": {
               "title": "Namespace",
               "type": "string"
            },
            "chart": {
               "title": "Chart",
               "type": "object"
            },
            "doc_links": {
               "title": "Doc Links",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/DocLink"
               }
            },
            "values": {
               "title": "Values",
               "type": "object"
            },
            "environment_values": {
               "title": "Environment Values",
               "type": "object",
               "additionalProperties": {
                  "type": "object"
               }
            },
            "secrets": {
               "title": "Secrets",
               "type": "object",
               "additionalProperties": {
                  "$ref": "#/definitions/ConditionalSecretConfig"
               }
            },
            "environment_secrets": {
               "title": "Environment Secrets",
               "type": "object",
               "additionalProperties": {
                  "type": "object",
                  "additionalProperties": {
                     "$ref": "#/definitions/ConditionalSecretConfig"
                  }
               }
            },
            "active_environments": {
               "title": "Active Environments",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "required": [
            "name",
            "namespace",
            "chart",
            "doc_links",
            "values",
            "environment_values",
            "secrets",
            "environment_secrets",
            "active_environments"
         ]
      },
      "IdentityProvider": {
         "title": "IdentityProvider",
         "description": "Type of identity provider used by Gafaelfawr.",
         "enum": [
            "CILogon",
            "GitHub",
            "OpenID Connect",
            "None"
         ]
      },
      "GafaelfawrGitHubTeam": {
         "title": "GafaelfawrGitHubTeam",
         "description": "Designates a GitHub team for use as a Gafaelfawr group.",
         "type": "object",
         "properties": {
            "organization": {
               "title": "Organization",
               "type": "string"
            },
            "team": {
               "title": "Team",
               "type": "string"
            }
         },
         "required": [
            "organization",
            "team"
         ]
      },
      "GafaelfawrGitHubGroup": {
         "title": "GafaelfawrGitHubGroup",
         "description": "A group based on a GitHub team.",
         "type": "object",
         "properties": {
            "github": {
               "$ref": "#/definitions/GafaelfawrGitHubTeam"
            }
         },
         "required": [
            "github"
         ]
      },
      "GafaelfawrScope": {
         "title": "GafaelfawrScope",
         "description": "A Gafaelfawr scope and its associated groups.",
         "type": "object",
         "properties": {
            "scope": {
               "title": "Scope",
               "type": "string"
            },
            "groups": {
               "title": "Groups",
               "type": "array",
               "items": {
                  "anyOf": [
                     {
                        "type": "string"
                     },
                     {
                        "$ref": "#/definitions/GafaelfawrGitHubGroup"
                     }
                  ]
               }
            }
         },
         "required": [
            "scope",
            "groups"
         ]
      }
   }
}

Config:
  • alias_generator: function = <function to_camel_case at 0x7f74eefac220>

  • allow_population_by_field_name: bool = True

Fields:
field applications: list[Application] [Required]#

List of enabled applications.

field argocd_rbac: list[list[str]] [Required] (alias 'argocdRbac')#

Argo CD RBAC configuration as a list of parsed CSV lines.

field argocd_url: Optional[str] = None (alias 'argocdUrl')#

URL for the Argo CD UI.

field fqdn: str [Required]#

Fully-qualified domain name.

field gafaelfawr_scopes: list[GafaelfawrScope] [Required] (alias 'gafaelfawrScopes')#

Gafaelfawr scopes and their associated groups.

field identity_provider: IdentityProvider [Required] (alias 'identityProvider')#

Type of identity provider used by Gafaelfawr in this environment.

field name: str [Required]#

Name of the environment.

field vault_path_prefix: str [Required] (alias 'vaultPathPrefix')#

Prefix of Vault paths, including the Kv2 mount point.

field vault_url: str [Required] (alias 'vaultUrl')#

URL of Vault server.

dict(**kwargs)#

Export the model as a dictionary.

Overridden to change the default of by_alias from False to True, so that by default the exported dictionary uses camel-case.

Parameters:

kwargs (Any) –

Return type:

dict[str, Any]

json(**kwargs)#

Export the model as JSON.

Overridden to change the default of by_alias from False to True, so that by default the exported dictionary uses camel-case.

Parameters:

kwargs (Any) –

Return type:

str

property argocd_rbac_csv: list[str]#

RBAC configuration formatted for an reStructuredText csv-table.

property vault_path: str#

Vault path without the initial Kv2 mount point.

property vault_read_approle: str#

Name of the Vault read AppRole for this environment.

property vault_read_policy: str#

Name of the Vault read policy for this environment.

property vault_write_policy: str#

Name of the Vault write policy for this environment.

property vault_write_token: str#

Display name of the Vault write token for this environment.

Unlike AppRole names, this could include a slash, but use the same name as the AppRole for consistency and simplicity.