-
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.
#3 - Restructure to hopefully generate release
- Loading branch information
1 parent
5b4734c
commit 60a6e8c
Showing
10 changed files
with
232 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ docker-compose*.yml | |
|
||
# Dioxus | ||
.dioxus/ | ||
slackwatch/ | ||
.slackwatch/ | ||
|
||
# Rust | ||
target/ | ||
|
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,6 @@ | ||
apiVersion: v2 | ||
name: slackwatch | ||
description: A Helm chart for Kubernetes to deploy Slackwatch | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "1.0" |
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,9 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Chart.Name }}-config | ||
data: | ||
config.yaml: | | ||
{{- if .Values.config }} | ||
{{- toYaml .Values.config | nindent 4 }} | ||
{{- end }} |
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,31 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Chart.Name }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ .Chart.Name }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ .Chart.Name }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
spec: | ||
serviceAccountName: {{ .Chart.Name }}-serviceaccount | ||
containers: | ||
- name: slackwatch | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
ports: | ||
- containerPort: {{ .Values.service.port }} | ||
volumeMounts: | ||
- name: config-volume | ||
mountPath: /app/config | ||
volumes: | ||
- name: config-volume | ||
configMap: | ||
name: {{ .Chart.Name }}-config |
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,71 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
{{- $paths := .Values.ingress.paths -}} | ||
{{- $extraPaths := .Values.ingress.extraPaths -}} | ||
{{- $pathType := .Values.ingress.pathType -}} | ||
{{- $servicePort := .Values.service.port -}} | ||
{{- $serviceName := .Chart.Name}} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Chart.Name }}-ingress | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: | ||
{{- with .Values.ingress.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.ingress.ingressClassName }} | ||
ingressClassName: {{ . }} | ||
{{- end }} | ||
rules: | ||
{{- if .Values.ingress.hosts }} | ||
{{- range $host := .Values.ingress.hosts }} | ||
- host: {{ $host | quote }} | ||
http: | ||
paths: | ||
{{- with $extraPaths }} | ||
{{- toYaml . | nindent 10 }} | ||
{{- end }} | ||
{{- range $p := $paths }} | ||
- path: {{ $p }} | ||
pathType: {{ $pathType }} | ||
backend: | ||
service: | ||
name: {{ $serviceName }}-svc | ||
port: | ||
{{- if kindIs "float64" $servicePort }} | ||
number: {{ $servicePort }} | ||
{{- else }} | ||
name: {{ $servicePort }} | ||
{{- end }} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- else }} | ||
- http: | ||
paths: | ||
{{- with $extraPaths }} | ||
{{- toYaml . | nindent 10 }} | ||
{{- end }} | ||
{{- range $p := $paths }} | ||
- path: {{ $p }} | ||
pathType: {{ $pathType }} | ||
backend: | ||
service: | ||
name: {{ .Chart.Name }}-svc | ||
port: | ||
{{- if kindIs "float64" $servicePort }} | ||
number: {{ $servicePort }} | ||
{{- else }} | ||
name: {{ $servicePort }} | ||
{{- end }} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- with .Values.ingress.tls }} | ||
tls: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
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,23 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ .Chart.Name }}-clusterrole | ||
namespace: {{ .Release.Namespace }} | ||
rules: | ||
- apiGroups: ["*"] | ||
resources: ["*"] | ||
verbs: ["*"] | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
name: {{ .Chart.Name }}-clusterrolebinding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ .Chart.Name }}-clusterrole | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Chart.Name }}-serviceaccount | ||
namespace: {{ .Release.Namespace }} |
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,23 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
name: {{ .Chart.Name }}-role | ||
rules: | ||
- apiGroups: ["*"] | ||
resources: ["*"] | ||
verbs: ["*"] | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: {{ .Chart.Name }}-rolebinding | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: {{ .Chart.Name }}-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Chart.Name }}-serviceaccount | ||
namespace: {{ .Release.Namespace }} |
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,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Chart.Name }}-svc | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ .Values.service.port }} | ||
targetPort: 8080 | ||
selector: | ||
app.kubernetes.io/name: {{ .Chart.Name }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} |
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,5 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ .Chart.Name }}-serviceaccount | ||
namespace: {{ .Release.Namespace }} |
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,51 @@ | ||
replicaCount: 1 | ||
namespace: slackwatch | ||
|
||
image: | ||
repository: ghcr.io/slackspace-io/slackwatch # Assuming this image is accessible as a placeholder | ||
pullPolicy: IfNotPresent | ||
tag: "latest" | ||
|
||
service: | ||
annotations: {} | ||
labels: {} | ||
type: ClusterIP | ||
port: 80 | ||
|
||
ingress: | ||
enabled: false | ||
labels: {} | ||
ingressClassName: "" | ||
paths: | ||
- / | ||
pathType: Prefix | ||
extraPaths: [] | ||
https: false | ||
annotations: {} | ||
tls: [] | ||
hosts: | ||
- test.slackwatch.default # Placeholder domain | ||
|
||
config: | ||
system: | ||
#default schedule is every 2 hours | ||
schedule: "0 0 */2 * *" | ||
data_dir: "/app/slackwatch/data" | ||
|
||
notifications: | ||
ntfy: | ||
url: "http://ntfy-server.default:80" # Assumes an 'ntfy-server' available in the 'default' namespace | ||
topic: "slackwatch-test" | ||
token: "slackwatch-ntfy-token" | ||
priority: 1 | ||
reminder: "24h" | ||
# ... other notification provider settings | ||
|
||
gitops: | ||
- name: "test-repo" # Placeholder name | ||
repository_url: "https://github.com/your-org/test-repo.git" | ||
branch: "main" | ||
access_token_env_name: "TEST_REPO_ACCESS_TOKEN" | ||
commit_message: "Automated commit by slackwatch" | ||
commit_email: "[email protected]" | ||
# ... other GitOps settings |