Skip to content

Commit

Permalink
Merge branch 'main' into fix/appset-token
Browse files Browse the repository at this point in the history
  • Loading branch information
jkleinlercher authored Dec 3, 2024
2 parents b4274b5 + 71aea99 commit 13071c4
Show file tree
Hide file tree
Showing 16 changed files with 81 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
teamName: ${{values.team}}
appName: ${{values.application_id}}
repoUrl: https://github.com/suxess-it/${{values.team}}-${{values.application_id}}
repoUrl: https://github.com/kubriX-demo/${{values.team}}-${{values.application_id}}
createAppNamespace: true
stages:
- name: "test"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
fqdn:
title: FQDN
type: string
default: 'lab.suxessit.k8s.cloud.uibk.ac.at'
default: 'demo.kubrix.cloud'
- title: Choose a location
required:
- repoUrl
Expand All @@ -55,7 +55,7 @@ spec:
allowedHosts:
- github.com
allowedOwners:
- suxess-it
- kubriX-demo
requestUserCredentials:
secretsKey: USER_OAUTH_TOKEN
additionalScopes:
Expand Down Expand Up @@ -91,7 +91,7 @@ spec:
#repoUrlRepo: ${{ (parameters.repoUrl | parseRepoUrl)["repo"] }}
#repoUrlowner: ${{ (parameters.repoUrl | parseRepoUrl)["owner"] }}
repoUrlRepo: ${{ steps['catalogFetch'].output.entity.metadata.name }}-${{ parameters.application_id }}
repoUrlowner: suxess-it
repoUrlowner: kubriX-demo
- id: publish-gitopsreposetup
name: Publish Template Gitops Repo
action: publish:github
Expand All @@ -100,7 +100,7 @@ spec:
allowedHosts: ['github.com']
description: This is Kargo Demo App ${{ parameters.application_id }}
#repoUrl: ${{ parameters.repoUrl }}
repoUrl: github.com?repo=${{ steps['catalogFetch'].output.entity.metadata.name }}-${{ parameters.application_id }}&owner=suxess-it
repoUrl: github.com?repo=${{ steps['catalogFetch'].output.entity.metadata.name }}-${{ parameters.application_id }}&owner=kubriX-demo
token: ${{ secrets.USER_OAUTH_TOKEN }}
fqdn: ${{ parameters.fqdn }}
#team: ${{ parameters.owner }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ spec:
input:
sourcePath: ./applicationsetup
targetPath: '.'
repoUrl: github.com?repo=${{ steps['catalogFetchGroup'].output.entity.metadata.name }}-apps&owner=suxess-it
repoUrl: github.com?repo=${{ steps['catalogFetchGroup'].output.entity.metadata.name }}-apps&owner=kubriX-demo
branchName: ${{ parameters.cluster_id }}
title: argoapps and system config for ${{ parameters.cluster_id }}
description: argoapps and system config for ${{ parameters.cluster_id }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# uibklab-apps
# demo apps

Home of app-of-apps argo applications
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ spec:
allowedHosts:
- github.com
allowedOwners:
- suxess-it
- kubriX-demo
requestUserCredentials:
secretsKey: USER_OAUTH_TOKEN
additionalScopes:
github:
- workflow
- user
allowedRepos:
- sx-cnp-oss
- kubriX-demo
steps:
- id: catalogFetch
name: Fetch component details
Expand All @@ -58,7 +58,7 @@ spec:
name: Fetch the actual team configuration File from Github
action: fetch:plain:file
input:
url: https://github.com/suxess-it/kubriX/blob/main/platform-apps/charts/team-onboarding/values-demo-metalstack.yaml
url: https://github.com/kubriX-demo/kubriX-demo/blob/main/platform-apps/charts/team-onboarding/values-demo-metalstack.yaml
targetPath: values-demo-metalstack.yaml

- id: update
Expand All @@ -69,7 +69,7 @@ spec:
content: >
# new team stanza for team ${{ steps['catalogFetch'].output.entity.metadata.name }}
- name: ${{ steps['catalogFetch'].output.entity.metadata.name }}
- name: ${{ steps['catalogFetch'].output.entity.metadata.name }}
sourceRepos:
- '*'
clusterResourceWhitelist:
Expand All @@ -78,17 +78,17 @@ spec:
- group: kargo.akuity.io
kind: Project
appOfAppsRepo:
repoURL: https://github.com/suxess-it/${{ steps['catalogFetch'].output.entity.metadata.name }}-apps
repoURL: https://github.com/kubriX-demo/${{ steps['catalogFetch'].output.entity.metadata.name }}-apps
path: demo-apps
revision: main
multiStageKargoAppSet:
organization: suxess-it
organization: kubriX-demo
- id: publish
name: Publish new Version of team configuration
action: publish:github:pull-request
input:
repoUrl: github.com?repo=kubriX&owner=suxess-it
repoUrl: github.com?repo=kubriX-demo&owner=kubriX-demo
title: Onboarding team ${{ steps['catalogFetch'].output.entity.metadata.name }}
description: Onboarding team ${{ steps['catalogFetch'].output.entity.metadata.name }}
targetPath: platform-apps/charts/team-onboarding
Expand All @@ -104,7 +104,7 @@ spec:
action: fetch:template
input:
url: ./skeleton
targetPath: .
targetPath: ./team-apps-of-apps
copyWithoutTemplating: []
values:
description: ${{ parameters.description }}
Expand All @@ -118,7 +118,8 @@ spec:
name: create team-apps Github repo
action: publish:github
input:
repoUrl: github.com?repo=${{ steps['catalogFetch'].output.entity.metadata.name }}-apps&owner=suxess-it
sourcePath: ./team-apps-of-apps
repoUrl: github.com?repo=${{ steps['catalogFetch'].output.entity.metadata.name }}-apps&owner=kubriX-demo
title: team-apps repo for ${{ steps['catalogFetch'].output.entity.metadata.name }}
description: team-apps repo for ${{ steps['catalogFetch'].output.entity.metadata.name }}
token: ${{ secrets.USER_OAUTH_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ spec:
input:
sourcePath: ./applicationsetup
targetPath: '.'
repoUrl: github.com?repo=${{ steps['catalogFetchGroup'].output.entity.metadata.name }}-apps&owner=suxess-it
repoUrl: github.com?repo=${{ steps['catalogFetchGroup'].output.entity.metadata.name }}-apps&owner=kubriX-demo
branchName: ${{ parameters.application_id }}
title: argo application and system config for ${{ parameters.application_id }}
description: argo application and system config for ${{ parameters.application_id }}
Expand Down
8 changes: 4 additions & 4 deletions backstage-resources/templates/showcase-templates-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
spec:
type: url
targets:
- https://github.com/suxess-it/sx-cnp-oss/blob/main/backstage-resources/templates/scaffolder-templates-demo/docs-template/template.yaml
- https://github.com/suxess-it/sx-cnp-oss/blob/main/backstage-resources/templates/scaffolder-templates-demo/sx-kargo-demo-app/template.yaml
- https://github.com/suxess-it/sx-cnp-oss/blob/main/backstage-resources/templates/scaffolder-templates-demo/sx-template-metalstack/template.yaml
- https://github.com/suxess-it/sx-cnp-oss/blob/main/backstage-resources/templates/scaffolder-templates-demo/sx-template-onboarding/template.yaml
- https://github.com/kubriX-demo/kubriX-demo/blob/main/backstage-resources/templates/scaffolder-templates-demo/docs-template/template.yaml
- https://github.com/kubriX-demo/kubriX-demo/blob/main/backstage-resources/templates/scaffolder-templates-demo/sx-kargo-demo-app/template.yaml
- https://github.com/kubriX-demo/kubriX-demo/blob/main/backstage-resources/templates/scaffolder-templates-demo/sx-template-metalstack/template.yaml
- https://github.com/kubriX-demo/kubriX-demo/blob/main/backstage-resources/templates/scaffolder-templates-demo/sx-template-onboarding/template.yaml
2 changes: 1 addition & 1 deletion bootstrap-app-demo-metalstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
spec:
project: default
source:
repoURL: https://github.com/suxess-it/sx-cnp-oss
repoURL: https://github.com/kubriX-demo/kubriX-demo
targetRevision: main
path: platform-apps/target-chart
helm:
Expand Down
6 changes: 3 additions & 3 deletions platform-apps/charts/backstage/values-demo-metalstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,13 @@ backstage:
- allow: [Component, System, API, Resource, Location, Template, Domain, User, Group ]
locations:
- type: url
target: https://github.com/suxess-it/sx-cnp-oss/blob/main/backstage-resources/templates/showcase-templates-demo.yaml
target: https://github.com/kubriX-demo/kubriX-demo/blob/main/backstage-resources/templates/showcase-templates-demo.yaml
rules:
- allow: [Template]
- type: url
target: https://github.com/suxess-it/sx-cnp-oss/blob/main/backstage-resources/entities/all.yaml
target: https://github.com/kubriX-demo/kubriX-demo/blob/main/backstage-resources/entities/all.yaml
- type: url
target: https://github.com/suxess-it/sx-cnp-oss/blob/main/backstage-resources/entities/demo.yaml
target: https://github.com/kubriX-demo/kubriX-demo/blob/main/backstage-resources/entities/demo.yaml
providers:
keycloakOrg:
default:
Expand Down
2 changes: 1 addition & 1 deletion platform-apps/charts/kargo/templates/github-creds-es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
data:
password: "{{ `{{ .GITHUB_TOKEN }}` }}"
username: "{{ `{{ .GITHUB_USERNAME }}` }}"
repoURL: "^https://github.com/suxess-it"
repoURL: "{{ .Values.credentialRepoUrl }}"
repoURLIsRegex: "true"
data:
- secretKey: GITHUB_TOKEN
Expand Down
13 changes: 13 additions & 0 deletions platform-apps/charts/kargo/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: kargo-controller-read-secrets
namespace: kargo
subjects:
- kind: ServiceAccount
name: kargo-controller
namespace: kargo
roleRef:
kind: ClusterRole
name: kargo-controller-read-secrets
apiGroup: rbac.authorization.k8s.io
2 changes: 2 additions & 0 deletions platform-apps/charts/kargo/values-demo-metalstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ kargo:
globalCredentials:
namespaces:
- kargo

credentialRepoUrl: "https://github.com/.*"
1 change: 1 addition & 0 deletions platform-apps/charts/kargo/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
credentialRepoUrl: ~
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ spec:
filters:
- repositoryMatch: ^{{ .name }}
pathsExist: [app-stages.yaml]
requeueAfterSeconds: {{ $.Values.scmAppsetRequeueAfterSeconds }}
template:
metadata:
name: '{{`{{ .repository }}`}}'
spec:
project: {{ .name }}-project
sources:
- repoURL: https://github.com/suxess-it/sx-cnp-oss
- repoURL: {{ $.Values.multiStageKargoAppSetHelmRepo }}
targetRevision: HEAD
path: team-apps/onboarding-apps-charts/multi-stage-app-with-kargo-pipeline
helm:
Expand Down
35 changes: 34 additions & 1 deletion platform-apps/charts/team-onboarding/values-demo-metalstack.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
teams: []
scmAppsetRequeueAfterSeconds: 30
multiStageKargoAppSetHelmRepo: "https://github.com/kubriX-demo/kubriX-demo"

teams:
- name: team-1
sourceRepos:
- '*'
clusterResourceWhitelist:
- group: ""
kind: Namespace
- group: kargo.akuity.io
kind: Project
appOfAppsRepo:
repoURL: https://github.com/kubriX-demo/team-1-apps
path: demo-apps
revision: main
multiStageKargoAppSet:
organization: kubriX-demo

# new team stanza for team team-a
- name: team-a
sourceRepos:
- '*'
clusterResourceWhitelist:
- group: ""
kind: Namespace
- group: kargo.akuity.io
kind: Project
appOfAppsRepo:
repoURL: https://github.com/kubriX-demo/team-a-apps
path: demo-apps
revision: main
multiStageKargoAppSet:
organization: kubriX-demo
2 changes: 2 additions & 0 deletions platform-apps/charts/team-onboarding/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
scmAppsetRequeueAfterSeconds: 1800
multiStageKargoAppSetHelmRepo: ~

0 comments on commit 13071c4

Please sign in to comment.