Skip to content

Commit

Permalink
Updating helm-base dependency, to use local ReleaseType (#10)
Browse files Browse the repository at this point in the history
* Updating depency on helm-base, fixes #9

* Tagging helm-base version
  • Loading branch information
rshade authored May 13, 2022
1 parent 2cf01aa commit de286d9
Show file tree
Hide file tree
Showing 31 changed files with 401 additions and 1,285 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ package-lock.json
**/version.txt
**/dist
nuget/
.vscode/
**/*.bak

ci-scripts/
*.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PROJECT := github.com/pulumi/pulumi-${PACK}

PROVIDER := pulumi-resource-${PACK}
CODEGEN := pulumi-gen-${PACK}
VERSION_PATH := provider/pkg/version.Version
VERSION_PATH := pkg/version.Version

WORKING_DIR := $(shell pwd)
SCHEMA_PATH := ${WORKING_DIR}/schema.json
Expand Down
13 changes: 8 additions & 5 deletions provider/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
module github.com/pulumi/pulumi-kubernetes-cert-manager

go 1.15
go 1.16

require (
github.com/joeduffy/pulumi-go-helmbase v0.0.11
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/joeduffy/pulumi-go-helmbase v0.0.12
github.com/pkg/errors v0.9.1
github.com/pulumi/pulumi-kubernetes/sdk/v3 v3.15.0
github.com/pulumi/pulumi/pkg/v3 v3.12.0
github.com/pulumi/pulumi/sdk/v3 v3.16.0
github.com/pulumi/pulumi-kubernetes/sdk/v3 v3.18.3
github.com/pulumi/pulumi/pkg/v3 v3.31.1
github.com/pulumi/pulumi/sdk/v3 v3.31.1
github.com/shirou/gopsutil v3.21.7+incompatible // indirect
gocloud.dev v0.23.0 // indirect
)
120 changes: 120 additions & 0 deletions provider/go.sum

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions provider/pkg/provider/chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
package provider

import (
helmbase "github.com/joeduffy/pulumi-go-helmbase"
appsv1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/apps/v1"
corev1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/core/v1"
helmv3 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/helm/v3"

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

Expand Down Expand Up @@ -87,10 +89,10 @@ type CertManagerArgs struct {

// HelmOptions is an escape hatch that lets the end user control any aspect of the
// Helm deployment. This exposes the entirety of the underlying Helm Release component args.
HelmOptions *helmv3.ReleaseType `pulumi:"helmOptions" pschema:"ref=#/types/chart-cert-manager:index:Release" json:"-"`
HelmOptions *helmbase.ReleaseType `pulumi:"helmOptions" pschema:"ref=#/types/chart-cert-manager:index:Release" json:"-"`
}

func (args *CertManagerArgs) R() **helmv3.ReleaseType { return &args.HelmOptions }
func (args *CertManagerArgs) R() **helmbase.ReleaseType { return &args.HelmOptions }

type CertManagerGlobal struct {
// Reference to one or more secrets to be used when pulling images.
Expand Down
8 changes: 8 additions & 0 deletions sdk/dotnet/Pulumi.KubernetesCertManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,19 @@
<None Include="version.txt" Pack="True" PackagePath="content" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="pulumi-plugin.json" />
<None Include="pulumi-plugin.json" Pack="True" PackagePath="content" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.Kubernetes" Version="3.*" ExcludeAssets="contentFiles" />
</ItemGroup>

<ItemGroup>
</ItemGroup>

<ItemGroup>
<None Include="logo.png">
<Pack>True</Pack>
Expand Down
38 changes: 17 additions & 21 deletions sdk/dotnet/Utilities.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
// *** WARNING: this file was generated by Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.IO;
using System.Reflection;
using Pulumi;

namespace Pulumi.KubernetesCertManager
{
static class Utilities
Expand All @@ -14,7 +9,7 @@ static class Utilities
{
foreach (var n in names)
{
var value = Environment.GetEnvironmentVariable(n);
var value = global::System.Environment.GetEnvironmentVariable(n);
if (value != null)
{
return value;
Expand All @@ -30,11 +25,11 @@ static class Utilities
var s = GetEnv(names);
if (s != null)
{
if (Array.IndexOf(trueValues, s) != -1)
if (global::System.Array.IndexOf(trueValues, s) != -1)
{
return true;
}
if (Array.IndexOf(falseValues, s) != -1)
if (global::System.Array.IndexOf(falseValues, s) != -1)
{
return false;
}
Expand All @@ -46,28 +41,29 @@ static class Utilities

public static double? GetEnvDouble(params string[] names) => double.TryParse(GetEnv(names), out double v) ? (double?)v : null;

public static InvokeOptions WithVersion(this InvokeOptions? options)
[global::System.Obsolete("Please use WithDefaults instead")]
public static global::Pulumi.InvokeOptions WithVersion(this global::Pulumi.InvokeOptions? options)
{
if (options?.Version != null)
{
return options;
}
return new InvokeOptions
{
Parent = options?.Parent,
Provider = options?.Provider,
Version = Version,
};
var dst = options ?? new global::Pulumi.InvokeOptions{};
dst.Version = options?.Version ?? Version;
return dst;
}

public static global::Pulumi.InvokeOptions WithDefaults(this global::Pulumi.InvokeOptions? src)
{
var dst = src ?? new global::Pulumi.InvokeOptions{};
dst.Version = src?.Version ?? Version;
return dst;
}

private readonly static string version;
public static string Version => version;

static Utilities()
{
var assembly = typeof(Utilities).GetTypeInfo().Assembly;
var assembly = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(Utilities)).Assembly;
using var stream = assembly.GetManifestResourceStream("Pulumi.KubernetesCertManager.version.txt");
using var reader = new StreamReader(stream ?? throw new NotSupportedException("Missing embedded version.txt file"));
using var reader = new global::System.IO.StreamReader(stream ?? throw new global::System.NotSupportedException("Missing embedded version.txt file"));
version = reader.ReadToEnd().Trim();
var parts = version.Split("\n");
if (parts.Length == 2)
Expand Down
4 changes: 4 additions & 0 deletions sdk/dotnet/pulumi-plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"resource": true,
"name": "kubernetes-cert-manager"
}

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

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Package kubernetes-cert-manager exports types, functions, subpackages for provisioning kubernetes-cert-manager resources.
//
package kubernetes
package kubernetescertmanager

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

Loading

0 comments on commit de286d9

Please sign in to comment.