Appearance
Step 2: Configuration ⚙️
After P1's Cyber team has reviewed and approved your template, we will:
- create your team and template at the appropriate Impact Level(s) and environments (staging and/or production), then generate a P1PS API token for your team.
- send your team credentials to you via DOD SAFE or IL4/IL5 Mattermost.
- make the necessary infrastructure changes to enable your deployed Party Bus application to communicate with P1PS.
Once that is completed, you are ready to configure your application to start making calls to P1PS.
Environment Variables
As part of the infrastructure setup that the P1PS team will perform on your behalf, we expose several environment variables for your application to use as Kubernetes secrets. However, you don't need to use these predefined environment variables if you choose to inject the values into your containers in other ways. We expose them for your convenience.
Environment Variable | Description |
---|---|
P1PS_AUTH_TOKEN | This is your team's authentication token (listed as EMAIL_AUTH in the P1PS API Docs) |
P1PS_BASE_URL | This is the cluster-internal base url your application will use to access the P1PS API |
P1PS_TEAM_ID | This is your team's ID in P1PS (listed as team_id in the P1PS API Docs) |
Referencing P1PS Environment Variables in Your Application Manifests
The P1PS Environment Variables listed above are stored in a Kustomize Component
named p1ps-secrets
.
In order to expose the P1PS Environment Variables to your running application containers in the Party Bus Kubernetes clusters you will have to make a change to your application's manifests.
Example Manifests
Each Party Bus application will have its own Kubernets Manifests repo, usually named yourapplication-manifests
in the same GitLab group as your application repositories. You will need to make the necessary manifest changes to reference p1ps-secrets
.
Here's a stripped-down manifest snippet to highlight specific attributes related to environment variables and secrets.
yaml
spec:
containers:
- name: awesomeapp
envFrom:
- secretRef:
name: p1ps-secrets
TIP
We recommend making these changes as a kustomize patch
in your manifest repo in the appropriate /[impact level]/overlays/[env]
directory.
Kubernetes Reference Docs
Need Help?
If you have any questions or require assistance, please don't hesitate to reach out on our support channel on IL2 Mattermost.