Skip to content
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

kubeconfig pulumi error #80

Open
braaar opened this issue Sep 12, 2023 · 3 comments · Fixed by #81
Open

kubeconfig pulumi error #80

braaar opened this issue Sep 12, 2023 · 3 comments · Fixed by #81

Comments

@braaar
Copy link
Member

braaar commented Sep 12, 2023

We are getting a strange error from pulumi preview action

    pulumi:pulumi:Stack (infra-core-prod):
      error: Error: call of google-native:container/v1:Cluster/getKubeconfig returned an error: marshaling properties: awaiting input property "kubeconfig": no output "endpoint" on resource ""
          at Object.callback (/home/runner/work/infra/infra/node_modules/@pulumi/google-native/node_modules/@pulumi/runtime/invoke.ts:282:37)
          at Object.onReceiveStatus (/home/runner/work/infra/infra/node_modules/@grpc/grpc-js/src/client.ts:338:26)
          at Object.onReceiveStatus (/home/runner/work/infra/infra/node_modules/@grpc/grpc-js/src/client-interceptors.ts:426:34)
          at Object.onReceiveStatus (/home/runner/work/infra/infra/node_modules/@grpc/grpc-js/src/client-interceptors.ts:389:48)
          at /home/runner/work/infra/infra/node_modules/@grpc/grpc-js/src/call-stream.ts:276:24
          at processTicksAndRejections (node:internal/process/task_queues:77:11)
@braaar
Copy link
Member Author

braaar commented Sep 12, 2023

Here's the related code:

import * as k8s from '@pulumi/kubernetes';
import { cluster } from '../google/gke';

export const provider = new k8s.Provider('k8s-provider', {
  kubeconfig: cluster.getKubeconfig(),
});

@braaar
Copy link
Member Author

braaar commented Sep 12, 2023

and in google/gke:

import * as google from '@pulumi/google-native';
import { region, zone } from '../config';
import { provider } from './providers';

const serverConfig = google.container.v1.getServerConfigOutput({
  location: region,
});

const engineVersion = serverConfig.apply((conf) => conf.validMasterVersions[0]);

export const cluster = new google.container.v1.Cluster(
  'main-cluster',
  {
    name: 'ayr-main-cluster',
    initialClusterVersion: engineVersion,
    autopilot: { enabled: true },
  },
  { provider: provider.google },
);

@braaar
Copy link
Member Author

braaar commented Sep 12, 2023

The issue still presists

@braaar braaar reopened this Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant