ApplicationConfig#

pydantic model phalanx.models.applications.ApplicationConfig#

Configuration for a Phalanx application.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "ApplicationConfig",
   "description": "Configuration for a Phalanx application.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "namespace": {
         "title": "Namespace",
         "type": "string"
      },
      "chart": {
         "title": "Chart",
         "type": "object"
      },
      "doc_links": {
         "items": {
            "$ref": "#/$defs/DocLink"
         },
         "title": "Doc Links",
         "type": "array"
      },
      "values": {
         "title": "Values",
         "type": "object"
      },
      "environment_values": {
         "additionalProperties": {
            "type": "object"
         },
         "title": "Environment Values",
         "type": "object"
      },
      "secrets": {
         "additionalProperties": {
            "$ref": "#/$defs/ConditionalSecretConfig"
         },
         "title": "Secrets",
         "type": "object"
      },
      "environment_secrets": {
         "additionalProperties": {
            "additionalProperties": {
               "$ref": "#/$defs/ConditionalSecretConfig"
            },
            "type": "object"
         },
         "title": "Environment Secrets",
         "type": "object"
      }
   },
   "$defs": {
      "ConditionalSecretConfig": {
         "additionalProperties": false,
         "description": "Possibly conditional specification for an application secret.",
         "properties": {
            "if": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "title": "Condition"
            },
            "description": {
               "description": "Description of the secret",
               "title": "Description",
               "type": "string"
            },
            "copy": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ConditionalSecretCopyRules"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Rules for where the secret should be copied from",
               "title": "Copy rules"
            },
            "generate": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ConditionalSimpleSecretGenerateRules"
                  },
                  {
                     "$ref": "#/$defs/ConditionalSourceSecretGenerateRules"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Rules for how the secret should be generated",
               "title": "Generation rules"
            },
            "onepassword": {
               "allOf": [
                  {
                     "$ref": "#/$defs/SecretOnepasswordConfig"
                  }
               ],
               "description": "Configuration for how the secret is stored in 1Password",
               "title": "1Password configuration"
            },
            "value": {
               "anyOf": [
                  {
                     "format": "password",
                     "type": "string",
                     "writeOnly": true
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Fixed value of secret",
               "title": "Value"
            }
         },
         "required": [
            "description"
         ],
         "title": "ConditionalSecretConfig",
         "type": "object"
      },
      "ConditionalSecretCopyRules": {
         "additionalProperties": false,
         "description": "Possibly conditional rules for copying a secret value from another.",
         "properties": {
            "if": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "title": "Condition"
            },
            "application": {
               "description": "Application from which the secret should be copied",
               "title": "Application",
               "type": "string"
            },
            "key": {
               "description": "Secret key from which the secret should be copied",
               "title": "Key",
               "type": "string"
            }
         },
         "required": [
            "application",
            "key"
         ],
         "title": "ConditionalSecretCopyRules",
         "type": "object"
      },
      "ConditionalSimpleSecretGenerateRules": {
         "additionalProperties": false,
         "description": "Conditional rules for generating a secret value with no source.",
         "properties": {
            "if": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "title": "Condition"
            },
            "type": {
               "description": "Type of secret",
               "enum": [
                  "password",
                  "gafaelfawr-token",
                  "fernet-key",
                  "rsa-private-key"
               ],
               "title": "Secret type",
               "type": "string"
            }
         },
         "required": [
            "type"
         ],
         "title": "ConditionalSimpleSecretGenerateRules",
         "type": "object"
      },
      "ConditionalSourceSecretGenerateRules": {
         "description": "Conditional rules for generating a secret from another secret.",
         "properties": {
            "if": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "title": "Condition"
            },
            "type": {
               "description": "Type of secret",
               "enum": [
                  "bcrypt-password-hash",
                  "mtime"
               ],
               "title": "Secret type",
               "type": "string"
            },
            "source": {
               "description": "Key of secret on which this secret is based. This may only be set by secrets of type `bcrypt-password-hash` or `mtime`.",
               "title": "Source key",
               "type": "string"
            }
         },
         "required": [
            "type",
            "source"
         ],
         "title": "ConditionalSourceSecretGenerateRules",
         "type": "object"
      },
      "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`.",
         "properties": {
            "url": {
               "title": "Url",
               "type": "string"
            },
            "title": {
               "title": "Title",
               "type": "string"
            },
            "id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Id"
            }
         },
         "required": [
            "url",
            "title"
         ],
         "title": "DocLink",
         "type": "object"
      },
      "SecretOnepasswordConfig": {
         "description": "Configuration for how a static secret is stored in 1Password.",
         "properties": {
            "encoded": {
               "default": false,
               "description": "Whether the 1Password copy of the secret is encoded in base64. 1Password doesn't support newlines in secrets, so secrets that contain significant newlines have to be encoded when storing them in 1Password. This flag indicates that this has been done, and therefore when retrieving the secret from 1Password, its base64-encoding must be undone.",
               "title": "Is base64-encoded",
               "type": "boolean"
            }
         },
         "title": "SecretOnepasswordConfig",
         "type": "object"
      }
   },
   "required": [
      "name",
      "namespace",
      "chart",
      "doc_links",
      "values",
      "environment_values",
      "secrets",
      "environment_secrets"
   ]
}

Fields:
field chart: dict[str, Any] [Required]#

Parsed Helm Chart.yaml file.

List of links to documentation about this application.

field environment_secrets: dict[str, dict[str, ConditionalSecretConfig]] [Required]#

Per-environment secrets for the application, by secret key.

field environment_values: dict[str, dict[str, Any]] [Required]#

Per-environment Helm chart overrides by environment name.

field name: str [Required]#

Name of the application.

field namespace: str [Required]#

Namespace to which the application is deployed.

field secrets: dict[str, ConditionalSecretConfig] [Required]#

Secrets for the application, by secret key.

field values: dict[str, Any] [Required]#

Base Helm chart values.

property homepage: str | None#

The Helm home field, typically used for the application’s docs.

property source_urls: list[str]#

Application source URLs from the Helm sources field.