Skip to content

Commit

Permalink
Define Supported Languages for Overlay Resources (#3107)
Browse files Browse the repository at this point in the history
docsgen supports defining the supported languages of an overlay now.
This will ensure only the supported languages show up in the language
choosers
in the registry.

Relates to pulumi/pulumi#13231
  • Loading branch information
flostadler authored Jul 16, 2024
1 parent cf02cf4 commit 17cb1fa
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Unreleased

### Added

- Define Supported Languages for Overlays (https://github.com/pulumi/pulumi-kubernetes/pull/3107)

### Fixed

- Updated logic to accurately detect if a resource is a Patch variant (https://github.com/pulumi/pulumi-kubernetes/pull/3102)
Expand Down
36 changes: 36 additions & 0 deletions provider/cmd/pulumi-resource-kubernetes/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -72586,6 +72586,12 @@
"kind"
],
"isOverlay": true,
"overlaySupportedLanguages": [
"csharp",
"go",
"python",
"nodejs"
],
"inputProperties": {
"apiVersion": {
"type": "string",
Expand Down Expand Up @@ -72636,6 +72642,12 @@
"kind"
],
"isOverlay": true,
"overlaySupportedLanguages": [
"csharp",
"go",
"python",
"nodejs"
],
"inputProperties": {
"apiVersion": {
"type": "string",
Expand Down Expand Up @@ -86998,6 +87010,12 @@
},
"type": "object",
"isOverlay": true,
"overlaySupportedLanguages": [
"csharp",
"go",
"python",
"nodejs"
],
"inputProperties": {
"chart": {
"type": "string",
Expand Down Expand Up @@ -87548,6 +87566,12 @@
"directory"
],
"isOverlay": true,
"overlaySupportedLanguages": [
"csharp",
"go",
"python",
"nodejs"
],
"inputProperties": {
"directory": {
"type": "string",
Expand Down Expand Up @@ -99778,6 +99802,12 @@
},
"type": "object",
"isOverlay": true,
"overlaySupportedLanguages": [
"csharp",
"go",
"python",
"nodejs"
],
"inputProperties": {
"file": {
"type": "string",
Expand Down Expand Up @@ -99810,6 +99840,12 @@
},
"type": "object",
"isOverlay": true,
"overlaySupportedLanguages": [
"csharp",
"go",
"python",
"nodejs"
],
"inputProperties": {
"files": {
"oneOf": [
Expand Down
6 changes: 6 additions & 0 deletions provider/pkg/gen/overlays.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ var helmV3ChartResource = pschema.ResourceSpec{
IsComponent: true,
ObjectTypeSpec: pschema.ObjectTypeSpec{
IsOverlay: true,
OverlaySupportedLanguages: []string{"csharp", "go", "python", "nodejs"},
Description: helmV3ChartMD,
Properties: map[string]pschema.PropertySpec{
"resources": {
Expand Down Expand Up @@ -1173,6 +1174,7 @@ var kustomizeDirectoryResource = pschema.ResourceSpec{
IsComponent: true,
ObjectTypeSpec: pschema.ObjectTypeSpec{
IsOverlay: true,
OverlaySupportedLanguages: []string{"csharp", "go", "python", "nodejs"},
Description: kustomizeDirectoryMD,
Properties: map[string]pschema.PropertySpec{
"directory": {
Expand Down Expand Up @@ -1286,6 +1288,7 @@ var yamlConfigFileResource = pschema.ResourceSpec{
IsComponent: true,
ObjectTypeSpec: pschema.ObjectTypeSpec{
IsOverlay: true,
OverlaySupportedLanguages: []string{"csharp", "go", "python", "nodejs"},
Description: configFileMD,
Properties: map[string]pschema.PropertySpec{
"resources": {
Expand Down Expand Up @@ -1378,6 +1381,7 @@ var yamlConfigGroupResource = pschema.ResourceSpec{
IsComponent: true,
ObjectTypeSpec: pschema.ObjectTypeSpec{
IsOverlay: true,
OverlaySupportedLanguages: []string{"csharp", "go", "python", "nodejs"},
Description: configGroupMD,
Properties: map[string]pschema.PropertySpec{
"resources": {
Expand Down Expand Up @@ -1520,6 +1524,7 @@ var yamlConfigGroupV2Resource = pschema.ResourceSpec{
var apiextensionsCustomResource = pschema.ResourceSpec{
ObjectTypeSpec: pschema.ObjectTypeSpec{
IsOverlay: true,
OverlaySupportedLanguages: []string{"csharp", "go", "python", "nodejs"},
Description: "CustomResource represents an instance of a CustomResourceDefinition (CRD). For example, the\n CoreOS Prometheus operator exposes a CRD `monitoring.coreos.com/ServiceMonitor`; to\n instantiate this as a Pulumi resource, one could call `new CustomResource`, passing the\n `ServiceMonitor` resource definition as an argument.",
Properties: map[string]pschema.PropertySpec{
"apiVersion": {
Expand Down Expand Up @@ -1587,6 +1592,7 @@ var apiextensionsCustomResource = pschema.ResourceSpec{
var apiextensionsCustomResourcePatch = pschema.ResourceSpec{
ObjectTypeSpec: pschema.ObjectTypeSpec{
IsOverlay: true,
OverlaySupportedLanguages: []string{"csharp", "go", "python", "nodejs"},
Description: "CustomResourcePatch represents an instance of a CustomResourceDefinition (CRD). For example, the\n CoreOS Prometheus operator exposes a CRD `monitoring.coreos.com/ServiceMonitor`; to\n instantiate this as a Pulumi resource, one could call `new CustomResourcePatch`, passing the\n `ServiceMonitor` resource definition as an argument.",
Properties: map[string]pschema.PropertySpec{
"apiVersion": {
Expand Down

0 comments on commit 17cb1fa

Please sign in to comment.