-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helm repositories #21
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,12 @@ The Flux plugin for Backstage provides views of [Flux](https://fluxcd.io/) resou | |
|
||
## Content | ||
|
||
- FluxEntityHelmReleasesCard - displays the state of HelmReleases for the Entity. | ||
All these cards display the relevant resources for the currently displayed entity. | ||
|
||
- FluxEntityHelmReleasesCard | ||
- FluxEntityGitRepositoriesCard | ||
- FluxEntityOCIRepositoriesCard | ||
- FluxEntityHelmRepositoriesCard | ||
|
||
## Prerequisite | ||
|
||
|
@@ -42,6 +47,8 @@ yarn add --cwd packages/app @weaveworksoss/backstage-plugin-flux | |
|
||
## Configuration | ||
|
||
The Flux plugins provide several different Cards, which are composable into your Backstage App. | ||
|
||
1. Add the card to your app EntityPage.tsx | ||
|
||
```tsx | ||
|
@@ -69,6 +76,7 @@ import { | |
FluxEntityHelmReleasesCard, | ||
FluxEntityGitRepositoriesCard, | ||
FluxEntityOCIRepositoriesCard, | ||
FluxEntityHelmRepositoriesCard, | ||
} from '@weaveworksoss/backstage-plugin-flux'; | ||
|
||
const serviceEntityPage = ( | ||
|
@@ -78,6 +86,9 @@ const serviceEntityPage = ( | |
<Grid item md={12}> | ||
<FluxEntityHelmReleasesCard /> | ||
</Grid> | ||
<Grid item md={12}> | ||
<FluxEntityHelmRepositoriesCard /> | ||
</Grid> | ||
<Grid item md={12}> | ||
<FluxEntityGitRepositoriesCard /> | ||
</Grid> | ||
|
@@ -130,11 +141,16 @@ spec: | |
interval: 1m0s | ||
``` | ||
|
||
5. Configure your `app-config.yaml` | ||
5. [Optional] Configure linking through to Weave GitOps, configure your `app-config.yaml` | ||
|
||
If you have [Weave GitOps](https://www.weave.works/product/gitops/) or [Weave GitOps Enterprise](https://www.weave.works/product/gitops-enterprise/) you can configure the plugins to link through to the UI which will provide more information on the resources. | ||
|
||
This will generate link URLs through to the relevant UIs relative to the configured URL, for example to view Helm Repositories, this would generate a URL that looks like this `https://wego.example.com/wego/helm_repo/details?clusterName=demo-cluster&name=podinfo&namespace=default`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice |
||
|
||
```yaml | ||
# app.config.yaml | ||
# app-config.yaml | ||
|
||
gitops: | ||
baseUrl: https://wego.example.com/ | ||
# | ||
baseUrl: https://wego.example.com | ||
``` |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions
54
plugins/backstage-plugin-flux/src/__fixtures__/helm_repository.json
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 @@ | ||
{ | ||
"apiVersion": "source.toolkit.fluxcd.io/v1beta2", | ||
"kind": "HelmRepository", | ||
"metadata": { | ||
"annotations": { | ||
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"source.toolkit.fluxcd.io/v1beta2\",\"kind\":\"HelmRepository\",\"metadata\":{\"annotations\":{},\"name\":\"podinfo\",\"namespace\":\"backstage\"},\"spec\":{\"interval\":\"1m\",\"url\":\"https://stefanprodan.github.io/podinfo\"}}\n" | ||
}, | ||
"creationTimestamp": "2023-06-29T13:50:21Z", | ||
"finalizers": [ | ||
"finalizers.fluxcd.io" | ||
], | ||
"generation": 1, | ||
"name": "podinfo", | ||
"namespace": "default", | ||
"resourceVersion": "1054927", | ||
"uid": "39f589d3-260d-4f93-a4f2-fcd6dc26b8a8" | ||
}, | ||
"spec": { | ||
"interval": "1m", | ||
"provider": "generic", | ||
"timeout": "60s", | ||
"url": "https://stefanprodan.github.io/podinfo" | ||
}, | ||
"status": { | ||
"artifact": { | ||
"digest": "sha256:80b091a3a69b9ecfebde40ce2a5f19e95f8f8ea956bd5635a31701f7fad1616e", | ||
"lastUpdateTime": "2023-06-29T13:50:22Z", | ||
"path": "helmrepository/backstage/podinfo/index-80b091a3a69b9ecfebde40ce2a5f19e95f8f8ea956bd5635a31701f7fad1616e.yaml", | ||
"revision": "sha256:80b091a3a69b9ecfebde40ce2a5f19e95f8f8ea956bd5635a31701f7fad1616e", | ||
"size": 43126, | ||
"url": "http://source-controller.flux-system.svc.cluster.local./helmrepository/backstage/podinfo/index-80b091a3a69b9ecfebde40ce2a5f19e95f8f8ea956bd5635a31701f7fad1616e.yaml" | ||
}, | ||
"conditions": [ | ||
{ | ||
"lastTransitionTime": "2023-07-03T09:18:10Z", | ||
"message": "stored artifact: revision 'sha256:80b091a3a69b9ecfebde40ce2a5f19e95f8f8ea956bd5635a31701f7fad1616e'", | ||
"observedGeneration": 1, | ||
"reason": "Succeeded", | ||
"status": "True", | ||
"type": "Ready" | ||
}, | ||
{ | ||
"lastTransitionTime": "2023-06-29T13:50:22Z", | ||
"message": "stored artifact: revision 'sha256:80b091a3a69b9ecfebde40ce2a5f19e95f8f8ea956bd5635a31701f7fad1616e'", | ||
"observedGeneration": 1, | ||
"reason": "Succeeded", | ||
"status": "True", | ||
"type": "ArtifactInStorage" | ||
} | ||
], | ||
"observedGeneration": 1, | ||
"url": "http://source-controller.flux-system.svc.cluster.local./helmrepository/backstage/podinfo/index.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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add helmrepo to entitypage here too