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

[Question] interactiveMode must be specified for chainsaw to use exec authentication plugin #2263

Open
haarchri opened this issue Jan 14, 2025 · 0 comments
Labels
question Further information is requested

Comments

@haarchri
Copy link

Describe your question

i get the following error:

2025/01/14 19:15:27         === STDERR
2025/01/14 19:15:27         error: interactiveMode must be specified for chainsaw to use exec authentication plugin
2025/01/14 19:15:27     l.go:52: ���������| 19:15:27 | apply | Apply Resources          | SCRIPT    | ERROR |

my kubeconfig looks something like:

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: abc
    server: https://xyz
  name: xyz
contexts:
- context:
    cluster: xyz
    extensions:
    - extension:
        apiVersion: xyz.io/v1alpha1
        kind: Ext
        spec:
          cloud:
            organization: xyz
            space: xyz-gcp-us-central-1
      name: xyz.io/rocket
    namespace: default
    user: xyz
  name: xyz
current-context: xyz
kind: Config
preferences: {}
users:
- name: xyz
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1
      args:
      - organization
      - token
      command: xyz
      env:
      - name: ORGANIZATION
        value: xyz
      - name: PROFILE
        value: test
      interactiveMode: IfAvailable
      provideClusterInfo: false
cat 00-apply.yaml 
# This file belongs to the resource apply step.
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
  name: apply
spec:
  timeouts:
    apply: 1h23m20s
    assert: 1h23m20s
    exec: 1h23m20s
  steps:
  - name: Run Setup Script
    description: Setup the test environment by running the setup script.
    try:
    - command:
        entrypoint: /var/folders/ym/wqrhc4wd0mj6b1wbkc25s0_80000gn/T/xyz-174868208/setup.sh
  - name: Apply Resources
    description: Apply resources to the cluster.
    try:
    - apply:
        file: test-input.yaml
    - script:
        content: |
          echo "Runnning annotation script"
  - name: Assert Status Conditions
    description: |
      Assert applied resources. First, run the pre-assert script if exists.
      Then, check the status conditions. Finally run the post-assert script if it
      exists.
    try:
    - assert:
        resource:
          apiVersion: platform.example.com/v1alpha1
          kind: StorageBucket
          metadata:
            name: example
            namespace: default
          status:
            ((conditions[?type == 'Ready'])[0]):
              status: "True"

chainsaw version Version

v0.2.12

Additional context

No response

@haarchri haarchri added the question Further information is requested label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant