Skip to content

Commit

Permalink
Further fluxv2 plugin features: CreateInstalledPackage initial implem…
Browse files Browse the repository at this point in the history
…entation (#3337)

* add a check at bootstrap that flux is installed

* fix up .protos for CreateInstalledPackage API

* intermediate step

* intermediate step 2

* remove files from PR that I didn't modify

* michael's feedback #1

* michael's feedback #2
  • Loading branch information
gfichtenholt committed Sep 2, 2021
1 parent b063daa commit 954ebb0
Show file tree
Hide file tree
Showing 27 changed files with 522 additions and 128 deletions.
6 changes: 3 additions & 3 deletions chart/kubeapps/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dependencies:
version: 10.9.4
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 15.0.3
digest: sha256:460039df32351772e22bc018ee347662d8cc3293f759863a82a2548048ca38d1
generated: "2021-08-27T15:35:25.442508645Z"
version: 15.2.0
digest: sha256:05365cdc523caeb33e0771ea73f7d154066273db1694f461dc12adf4cdb49113
generated: "2021-08-31T18:51:40.216781-07:00"
6 changes: 6 additions & 0 deletions chart/kubeapps/templates/kubeappsapis/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ rules:
- apiGroups:
- "packageinstalls.packaging.carvel.dev"
- "packagerepositories.packaging.carvel.dev"
# TODO (gfichtenholt) possibly surround this with if "fluxv2 plugin is enabled"
- "source.toolkit.fluxcd.io"
- "helm.toolkit.fluxcd.io"
resources: ['*']
Expand All @@ -26,6 +27,11 @@ rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list"]
# needed by fluxv2 plug-in to check whether flux CRDs have been installed
# TODO (gfichtenholt) possibly surround this with "if fluxv2 plugin is enabled"
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["get", "list"]
{{- if .Values.kubeappsapis.unsafeUseDemoSA }}
# Dev-only ClusterRoleBinding to the ServiceAccount
---
Expand Down
71 changes: 71 additions & 0 deletions cmd/kubeapps-apis/docs/kubeapps-apis.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,16 @@
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1alpha1CreateInstalledPackageRequest"
}
}
],
"tags": [
"PackagesService"
]
Expand Down Expand Up @@ -782,6 +792,16 @@
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1alpha1CreateInstalledPackageRequest"
}
}
],
"tags": [
"FluxV2PackagesService"
]
Expand Down Expand Up @@ -1217,6 +1237,16 @@
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1alpha1CreateInstalledPackageRequest"
}
}
],
"tags": [
"HelmPackagesService"
]
Expand Down Expand Up @@ -1609,6 +1639,16 @@
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1alpha1CreateInstalledPackageRequest"
}
}
],
"tags": [
"KappControllerPackagesService"
]
Expand Down Expand Up @@ -2040,6 +2080,37 @@
"description": "A Context specifies the context of the message",
"title": "Context"
},
"v1alpha1CreateInstalledPackageRequest": {
"type": "object",
"properties": {
"availablePackageRef": {
"$ref": "#/definitions/v1alpha1AvailablePackageReference",
"description": "A reference uniquely identifying the package available for installation."
},
"targetContext": {
"$ref": "#/definitions/v1alpha1Context",
"description": "The target context where the package is intended to be installed."
},
"name": {
"type": "string",
"title": "A user-provided name for the installed package (eg. project-x-db)"
},
"pkgVersionReference": {
"$ref": "#/definitions/v1alpha1VersionReference",
"description": "For helm this will be the exact version in VersionReference.version\nFor other plugins we can extend the VersionReference as needed."
},
"values": {
"type": "string",
"description": "An optional serialized values string to be included when templating a package\nin the format expected by the plugin. Included when the backend format doesn't\nuse secrets or configmaps for values or supports both. These values are layered\non top of any values refs above, when relevant."
},
"reconciliationOptions": {
"$ref": "#/definitions/v1alpha1ReconciliationOptions",
"description": "An optional field for specifying data common to systems that reconcile\nthe package on the cluster."
}
},
"description": "Request for CreateInstalledPackage",
"title": "CreateInstalledPackageRequest"
},
"v1alpha1CreateInstalledPackageResponse": {
"type": "object",
"properties": {
Expand Down
22 changes: 11 additions & 11 deletions cmd/kubeapps-apis/gen/core/packages/v1alpha1/packages.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 8 additions & 10 deletions cmd/kubeapps-apis/gen/core/packages/v1alpha1/packages.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions cmd/kubeapps-apis/gen/plugins/helm/packages/v1alpha1/helm.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 954ebb0

Please sign in to comment.