Skip to content

Add support for structurizr config (users, roles, saml, log4j2), env, volumes, volumeMounts #2

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

Merged
merged 3 commits into from
Sep 27, 2023

Conversation

thedmeyer
Copy link
Contributor

@virtualroot Hello!

Pull Request Description

Update to Structurizr Helm Chart (Version: 0.2.0)

Changes:

  1. Version Bump: Updated the chart version from 0.1.0 to 0.2.0.

  2. README.md:

    • Expanded the documentation for the following:
      • volumes and volumeMounts
      • properties, users, roles, and saml-idp-metadata
      • env configuration
    • Added TODO list indicating features in development and features completed.
  3. ConfigMap Templates:

    • Introduced multiple ConfigMap templates for various configurations:
      • structurizr.properties
      • structurizr.users
      • structurizr.roles
      • SAML identity provider metadata
      • Log4j2 configurations
  4. Deployment Template:

    • Added environment variables (if specified in values) to the Structurizr container.
    • Introduced volume mounts for configurations, and the corresponding volumes pointing to the ConfigMaps.
  5. Values.yaml:

    • Introduced placeholders for the following:
      • Additional volumes and volumeMounts
      • Structurizr-specific properties, user credentials, roles, and SAML configurations
      • Log4j2 configurations
      • Environment variables

This update adds comprehensive configuration capabilities to the Structurizr Helm chart, making it flexible for various deployment scenarios.

How to Test:

  1. Update your local helm repo.
  2. Deploy the Structurizr application using the updated helm chart with custom configurations.
  3. Verify that the application picks up the specified configurations.
  4. Ensure that any volumes or volume mounts specified in values.yaml are correctly attached to the pods.

What these changes allow for (a use case)

values.yaml Notes: Using gcsfuse

The Structurizr Helm chart now provides the capability to use gcsfuse for mounting Google Cloud Storage (GCS) buckets directly to the pod. This is especially useful when you wish to leverage GCS for storing Structurizr-related data or for other data retrieval purposes.

Configuration:

  1. volumes:
    • Define a volume of type csi with the gcsfuse.csi.storage.gke.io driver.
    • Specify volume attributes like the bucketName and mountOptions.
volumes:
  - name: structurizr-bucket
    csi:
      driver: gcsfuse.csi.storage.gke.io
      volumeAttributes:
        bucketName: "structurizr-google-storage-bucket-name"
        mountOptions: "implicit-dirs"
  1. volumeMounts:
    • Define where you'd like this volume to be mounted within the Structurizr container.
volumeMounts:
  - name: structurizr-bucket
    mountPath: /usr/local/structurizr
  1. podAnnotations:
    • It's important to annotate the pod with gke-gcsfuse/volumes: "true" to indicate the use of gcsfuse.
podAnnotations:
  gke-gcsfuse/volumes: "true"

Prerequisites:

  • Ensure that the GCS bucket specified in bucketName exists.
  • The nodes running this pod should have the necessary IAM permissions to access the GCS bucket.
  • Ensure that gcsfuse is available and properly configured in your GKE cluster.

Reviewer's Note:

  • Ensure that the Helm chart, when deployed with gcsfuse configurations, properly mounts the GCS bucket and the Structurizr application can read/write data to it as expected.
  • Check for any potential security implications or best practices that might be missing in the documentation.

Thank you for your continued review!

@virtualroot virtualroot merged commit 9512908 into virtualroot:main Sep 27, 2023
@virtualroot
Copy link
Owner

virtualroot commented Sep 27, 2023

Many thanks @thedmeyer.

I haven't tested gcsfuse tho. If it works for you, it works for me. 🤙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants