-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mattermost component and abstract db and object storage (#6)
* Add mattermost component
- Loading branch information
1 parent
cec5278
commit b76487b
Showing
21 changed files
with
465 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
application: | ||
name: mattermost | ||
createNamespace: ###ZARF_VAR_MATTERMOST_CREATE_NAMESPACE### | ||
namespace: mattermost | ||
path: chart | ||
repository: https://repo1.dso.mil/big-bang/product/packages/mattermost.git | ||
ref: | ||
# renovate: datasource=gitlab-tags depName=big-bang/product/packages/mattermost versioning=loose registryUrl=https://repo1.dso.mil | ||
tag: 8.1.2-bb.0 | ||
dependsOn: | ||
###ZARF_VAR_MATTERMOST_DEPENDS_ON### | ||
baseValues: | ||
# hostname is deprecated and replaced with domain. But if hostname exists then use it. | ||
hostname: ###ZARF_VAR_DOMAIN### | ||
domain: ###ZARF_VAR_DOMAIN### | ||
|
||
enterprise: | ||
enabled: ###ZARF_VAR_MATTERMOST_ENTERPRISE_ENABLED### | ||
license: ###ZARF_VAR_MATTERMOST_ENTERPRISE_LICENSE### | ||
|
||
openshift: false | ||
|
||
image: | ||
imagePullPolicy: IfNotPresent | ||
|
||
istio: | ||
enabled: true | ||
chat: | ||
gateways: | ||
- istio-system/tenant | ||
injection: enabled | ||
podAnnotations: | ||
bigbang.dev/istioVersion: ###ZARF_VAR_ISTIO_VERSION### | ||
updateJob: | ||
disabled: true | ||
|
||
monitoring: | ||
enabled: true | ||
|
||
serviceMonitor: | ||
enabled: true | ||
# conditional passes only for default istio: enabled, mTLS: STRICT | ||
scheme: https | ||
tlsConfig: | ||
caFile: /etc/prom-certs/root-cert.pem | ||
certFile: /etc/prom-certs/cert-chain.pem | ||
keyFile: /etc/prom-certs/key.pem | ||
insecureSkipVerify: true # Prometheus does not support Istio security naming, thus skip verifying target pod certificate | ||
sso: | ||
enabled: false | ||
client_id: | ||
client_secret: no-secret | ||
auth_endpoint: https://login.dso.mil/auth/realms/baby-yoda/protocol/openid-connect/auth | ||
token_endpoint: https://login.dso.mil/auth/realms/baby-yoda/protocol/openid-connect/token | ||
user_api_endpoint: https://login.dso.mil/auth/realms/baby-yoda/protocol/openid-connect/userinfo | ||
|
||
networkPolicies: | ||
enabled: true | ||
controlPlaneCidr: 0.0.0.0/0 | ||
ingressLabels: | ||
app: tenant-ingressgateway | ||
istio: null | ||
|
||
global: | ||
imagePullSecrets: | ||
- name: private-registry | ||
database: | ||
secret: "mattermost-postgres" | ||
fileStore: | ||
secret: "mattermost-object-store" | ||
url: "mattermost-object-store.mattermost.svc.cluster.local" | ||
bucket: "mattermost-bucket" | ||
|
||
mattermostEnvs: | ||
# required for Keycloak >= 20.X to work with gitlab auth pointed to Keycloak | ||
MM_GITLABSETTINGS_SCOPE: openid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
utils/pkg-deps/mattermost/minio/policy-exceptions/externalName.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: kyverno.io/v2alpha1 | ||
kind: PolicyException | ||
metadata: | ||
name: mattermost-object-storage-external-names-exception | ||
namespace: mattermost | ||
spec: | ||
exceptions: | ||
- policyName: restrict-external-names | ||
ruleNames: | ||
- external-names | ||
match: | ||
any: | ||
- resources: | ||
kinds: | ||
- Service | ||
namespaces: | ||
- mattermost | ||
names: | ||
- mattermost-object-store |
27 changes: 27 additions & 0 deletions
27
utils/pkg-deps/mattermost/minio/policy-exceptions/registry.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: kyverno.io/v2alpha1 | ||
kind: PolicyException | ||
metadata: | ||
name: mattermost-minio-registry-exception | ||
namespace: mattermost-minio | ||
spec: | ||
exceptions: | ||
- policyName: restrict-image-registries | ||
ruleNames: | ||
- validate-registries | ||
- autogen-validate-registries | ||
match: | ||
any: | ||
- resources: | ||
kinds: | ||
- Deployment | ||
namespaces: | ||
- mattermost-minio | ||
names: | ||
- minio | ||
- resources: | ||
kinds: | ||
- Job | ||
namespaces: | ||
- mattermost-minio | ||
names: | ||
- minio-post-job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Source: bigbang/templates/mattermost/secret-objectstore.yaml | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: mattermost-object-store | ||
namespace: mattermost | ||
type: kubernetes.io/opaque | ||
stringData: | ||
accesskey: ###ZARF_VAR_ACCESS_KEY### | ||
secretkey: ###ZARF_VAR_SECRET_KEY### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: mattermost-object-store | ||
namespace: mattermost | ||
spec: | ||
type: ExternalName | ||
externalName: minio.mattermost-minio.svc.cluster.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
replicas: 1 | ||
mode: standalone | ||
|
||
# Some reasonable requests instead of the bonkers defaults | ||
resources: | ||
requests: | ||
memory: 128Mi | ||
cpu: 100m | ||
|
||
buckets: | ||
- name: mattermost-bucket | ||
|
||
postJob: | ||
podAnnotations: | ||
sidecar.istio.io/inject: "false" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/zarf/main/zarf.schema.json | ||
kind: ZarfPackageConfig | ||
metadata: | ||
name: mattermost-minio | ||
version: "0.0.1" | ||
architecture: amd64 | ||
|
||
components: | ||
- name: minio-kyverno-exceptions | ||
required: true | ||
manifests: | ||
- name: kyverno-exceptions | ||
files: | ||
- policy-exceptions/registry.yaml | ||
- policy-exceptions/externalName.yaml | ||
- name: minio | ||
required: true | ||
charts: | ||
- name: minio | ||
version: 5.0.13 | ||
namespace: mattermost-minio | ||
url: https://charts.min.io/ | ||
valuesFiles: | ||
- "values.yaml" | ||
images: | ||
- quay.io/minio/mc:RELEASE.2023-06-28T21-54-17Z | ||
- quay.io/minio/minio:RELEASE.2023-07-07T07-13-57Z | ||
- name: minio-secret | ||
required: true | ||
actions: | ||
onDeploy: | ||
before: | ||
- cmd: kubectl get secret -n mattermost-minio minio --template='{{ index .data "rootPassword" }}' | base64 -d | ||
mute: true | ||
setVariables: | ||
- name: SECRET_KEY | ||
sensitive: true | ||
- cmd: kubectl get secret -n mattermost-minio minio --template='{{ index .data "rootUser" }}' | base64 -d | ||
mute: true | ||
setVariables: | ||
- name: ACCESS_KEY | ||
sensitive: true | ||
- name: mattermost-secret | ||
required: true | ||
manifests: | ||
- name: mattermost-secret | ||
files: | ||
- "secret.yaml" | ||
- name: mattermost-service | ||
required: true | ||
manifests: | ||
- name: mattermost-service | ||
files: | ||
- "service.yaml" |
Oops, something went wrong.