forked from redhat-appstudio/infra-deployments
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
14 changed files
with
329 additions
and
1 deletion.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
argo-cd-apps/base/member/infra-deployments/kubearchive/kubearchive.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,40 @@ | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: ApplicationSet | ||
metadata: | ||
name: kubearchive | ||
spec: | ||
generators: | ||
- merge: | ||
mergeKeys: | ||
- nameNormalized | ||
generators: | ||
- clusters: | ||
values: | ||
sourceRoot: components/kubearchive | ||
environment: staging | ||
clusterDir: "" | ||
- list: | ||
elements: [] | ||
template: | ||
metadata: | ||
name: kubearchive-{{nameNormalized}} | ||
spec: | ||
project: default | ||
source: | ||
path: '{{values.sourceRoot}}/{{values.environment}}/{{values.clusterDir}}' | ||
repoURL: https://github.com/redhat-appstudio/infra-deployments.git | ||
targetRevision: main | ||
destination: | ||
namespace: kubearchive | ||
server: '{{server}}' | ||
syncPolicy: | ||
automated: | ||
prune: true | ||
selfHeal: true | ||
syncOptions: | ||
- CreateNamespace=true | ||
retry: | ||
limit: 50 | ||
backoff: | ||
duration: 15s |
7 changes: 7 additions & 0 deletions
7
argo-cd-apps/base/member/infra-deployments/kubearchive/kustomization.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,7 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- kubearchive.yaml | ||
components: | ||
- ../../../../k-components/deploy-to-member-cluster-merge-generator |
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
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,11 @@ | ||
# See the OWNERS docs: https://go.k8s.io/owners | ||
|
||
approvers: | ||
- rh-hemartin | ||
- skoved | ||
- ggallen | ||
|
||
reviewers: | ||
- rh-hemartin | ||
- skoved | ||
- ggallen |
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,120 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- https://github.com/kubearchive/kubearchive/releases/download/v0.1.0/kubearchive.yaml?timeout=90 | ||
- rbac.yaml | ||
namespace: kubearchive | ||
|
||
# These patches add an annotation so an OpenShift service | ||
# creates the TLS secrets instead of Cert Manager | ||
patches: | ||
- patch: |- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: kubearchive-api-server | ||
annotations: | ||
service.beta.openshift.io/serving-cert-secret-name: kubearchive-api-server-tls | ||
- patch: |- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: kubearchive-operator-webhooks | ||
annotations: | ||
service.beta.openshift.io/serving-cert-secret-name: kubearchive-operator-tls | ||
- patch: |- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kubearchive-api-server | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: kubearchive-api-server | ||
resources: | ||
requests: | ||
cpu: 50m | ||
memory: 50Mi | ||
limits: | ||
cpu: 100m | ||
memory: 50Mi | ||
securityContext: | ||
readOnlyRootFilesystem: true | ||
runAsNonRoot: true | ||
- patch: |- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kubearchive-operator | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: manager | ||
securityContext: | ||
readOnlyRootFilesystem: true | ||
runAsNonRoot: true | ||
ports: | ||
- containerPort: 8081 | ||
- name: kube-rbac-proxy | ||
securityContext: | ||
readOnlyRootFilesystem: true | ||
runAsNonRoot: true | ||
- patch: |- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kubearchive-sink | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: kubearchive-sink | ||
resources: | ||
requests: | ||
cpu: 50m | ||
memory: 50Mi | ||
limits: | ||
cpu: 100m | ||
memory: 50Mi | ||
securityContext: | ||
readOnlyRootFilesystem: true | ||
runAsNonRoot: true | ||
# Remove Certificates and Issuer | ||
- patch: |- | ||
$patch: delete | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: "kubearchive-api-server-certificate" | ||
- patch: |- | ||
$patch: delete | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: "kubearchive-ca" | ||
- patch: |- | ||
$patch: delete | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: "kubearchive-ca" | ||
- patch: |- | ||
$patch: delete | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: "kubearchive" | ||
- patch: |- | ||
$patch: delete | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: "kubearchive-operator-certificate" |
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,14 @@ | ||
--- | ||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: kubearchive-maintainers | ||
namespace: kubearchive | ||
subjects: | ||
- kind: Group | ||
apiGroup: rbac.authorization.k8s.io | ||
name: konflux-kubearchive | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: component-maintainer |
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,20 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../base | ||
- postgresql.yaml | ||
|
||
namespace: kubearchive | ||
|
||
secretGenerator: | ||
- behavior: merge | ||
literals: | ||
- POSTGRES_DB=kubearchive | ||
- POSTGRES_USER=kubearchive | ||
- POSTGRES_URL=postgresql.kubearchive.svc.cluster.local | ||
- POSTGRES_PASSWORD=password # notsecret | ||
name: kubearchive-database-credentials | ||
type: Opaque | ||
|
||
commonAnnotations: | ||
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true |
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,53 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: postgresql | ||
annotations: | ||
ignore-check.kube-linter.io/no-read-only-root-fs: "Postgres requires to write on root fs, ignoring this one as this is only used in development environment" | ||
labels: | ||
app: postgresql | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: postgresql | ||
template: | ||
metadata: | ||
labels: | ||
app: postgresql | ||
spec: | ||
containers: | ||
- name: postgresql | ||
image: bitnami/postgresql:16.4.0 | ||
ports: | ||
- containerPort: 5432 | ||
resources: | ||
requests: | ||
cpu: 50m | ||
memory: 100Mi | ||
limits: | ||
cpu: 100m | ||
memory: 100Mi | ||
env: | ||
- name: POSTGRESQL_DATABASE | ||
value: kubearchive | ||
- name: POSTGRESQL_USERNAME | ||
value: kubearchive | ||
- name: POSTGRESQL_PASSWORD | ||
value: password # notsecret | ||
securityContext: | ||
readOnlyRootFilesystem: false | ||
runAsNonRoot: true | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: postgresql | ||
labels: | ||
app: postgresql | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 5432 | ||
selector: | ||
app: postgresql |
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,26 @@ | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
name: database-secret | ||
annotations: | ||
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true | ||
argocd.argoproj.io/sync-wave: "-1" | ||
spec: | ||
dataFrom: | ||
- extract: | ||
key: integrations-output/terraform-resources/appsres09ue1/stonesoup-infra-stage/kube-archive-staging-rds | ||
refreshInterval: 1h | ||
secretStoreRef: | ||
kind: ClusterSecretStore | ||
name: appsre-vault | ||
target: | ||
creationPolicy: Owner | ||
deletionPolicy: Delete | ||
name: kubearchive-database-secret | ||
template: | ||
data: | ||
POSTGRES_PORT: "5432" | ||
POSTGRES_URL: "{{ .db.host }}" | ||
POSTGRES_PASSWORD: "{{ .db.password }}" | ||
POSTGRES_USER: "{{ .db.user }}" | ||
POSTGRES_DATABASE: "{{ .db.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,10 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../base | ||
- database-secret.yaml | ||
|
||
namespace: kubearchive | ||
|
||
commonAnnotations: | ||
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true |