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

resource mapping not found for name: "spinnaker" namespace: "spinnaker" from "STDIN": no matches for kind "SpinnakerService" in version "spinnaker.io/v1alpha2" #264

Open
tirelibirefe opened this issue Aug 8, 2022 · 8 comments

Comments

@tirelibirefe
Copy link

tirelibirefe commented Aug 8, 2022

Hello,
This is what I do...

Installing operator:
helm install armory-spinnaker-operator -n spinnaker-operator --wait armory/armory-spinnaker-operator

things work; no problem.

$ k get crd -A | grep spinnaker
armoryaccounts.spinnaker.armory.io                    2022-08-03T23:28:51Z
spinnakerservices.spinnaker.armory.io                 2022-08-03T23:28:51Z

$ k api-resources | grep spin
armoryaccounts                    armoryaccount   spinnaker.armory.io/v1alpha2                true         ArmoryAccount
spinnakerservices                 spinsvc         spinnaker.armory.io/v1alpha2                true         SpinnakerService

this is my spinnakerservice manifest:

apiVersion: spinnaker.io/v1alpha2
kind: SpinnakerService
metadata:
  name: spinnaker
spec:
  spinnakerConfig:
    config:
      version: 1.27.0
      persistentStorage:
        persistentStoreType: s3
        s3:
          bucket: $S3_BUCKET
          rootFolder: front50
          region: eu-central-1
          accessKeyId: AKIAKNLKJNLNLBLAVLA
          secretAccessKey: asdşfhUblalblbalalblawerwrwrt
  expose:
    type: service
    service:
      type: ClusterIP

I get the following error:

error: resource mapping not found for name: "spinnaker" namespace: "spinnaker" from "STDIN": no matches 
for kind "SpinnakerService" in version "spinnaker.io/v1alpha2"
ensure CRDs are installed first

Am I missing something? Could you please advise?

Thanks & Regards

@ichi0915
Copy link
Contributor

ichi0915 commented Aug 8, 2022

I found a similar issue when you try to install the operator and spinnaker in a single namespace, currently working on this Branch to solve that, I think those changes might also solve this issue.

@tirelibirefe
Copy link
Author

tirelibirefe commented Aug 8, 2022

Oh thanks for your reply; Maybe there is a quick workaround which you can advise until you fix the problem? I need to deploy a Spinnaker but stuck the problem, cannot progress.

@tirelibirefe
Copy link
Author

I installed the operator which you referenced; now I get following error message:

Error from server (InternalError): error when creating "STDIN": Internal error occurred: failed calling webhook "webhook-spinnakerservices-v1alpha2.spinnaker.io": Post "https://spinnaker-operator.spinnaker-operator.svc:443/validate-spinnaker-io-v1alpha2-spinnakerservice?timeout=10s": Address is not allowed

@ichi0915
Copy link
Contributor

ichi0915 commented Aug 9, 2022

Sorry I just saw that your are using spinnaker.armory.io, those resources come from the armory operator not the spinnaker operator, the armory operator is an extension of the Spinnaker Operator and its on a different repo.

Your manifest is correct you are using apiVersion: spinnaker.io/v1alpha2 but not your operator, to install spinnaker in your current operator you should be using apiVersion: spinnaker.armory.io/v1alpha2 and also change version to 2.27.3.

when using this operator you should see this output:

$ kubectl api-resources | grep spin
spinnakeraccounts                 spinaccount   spinnaker.io/v1alpha2                  true         SpinnakerAccount
spinnakerservices                 spinsvc       spinnaker.io/v1alpha2                  true         SpinnakerService

@tirelibirefe
Copy link
Author

tirelibirefe commented Aug 10, 2022

@ichi0915 thanks for your advise. Good catch!
I think I was misunderstood. Currently I would like to go on with Armory; so I just replaced apiVersion: spinnaker.io/v1alpha2 with apiVersion: spinnaker.armory.io/v1alpha2 and changed version in my SpinnakerService yaml .
(I used version: 2.28.0, because I don't have enterprise Armory.)
My current config is that;

$ kubectl api-resources | grep spin
armoryaccounts                    armoryaccount   spinnaker.armory.io/v1alpha2                true         ArmoryAccount
spinnakerservices                 spinsvc         spinnaker.armory.io/v1alpha2                true         SpinnakerService

SpinnakerService

apiVersion: spinnaker.armory.io/v1alpha2
kind: SpinnakerService
metadata:
  name: spinnaker
spec:
  spinnakerConfig:
    config:
      version: 2.28.0
      persistentStorage:
        persistentStoreType: s3
        s3:
          bucket: $S3_BUCKET
          rootFolder: front50
          region: eu-central-1
          accessKeyId: AKIAXXXXXXXXX
          secretAccessKey: xxxxxxxxxxxxxxxx
  expose:
    type: service
    service:
      type: ClusterIP
$ k get svc -n spinnaker-operator
NAME                         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)             AGE
spinnaker-operator           ClusterIP   172.20.232.37   <none>        443/TCP             25m
spinnaker-operator-metrics   ClusterIP   172.20.202.48   <none>        8686/TCP,8383/TCP   25m

...and the result:

Error from server (InternalError): error when creating "STDIN": Internal error occurred: failed calling webhook "webhook-spinnakerservices-v1alpha2.spinnaker.armory.io": Post "https://spinnaker-operator.spinnaker-operator.svc:443/validate-spinnaker-armory-io-v1alpha2-spinnakerservice?timeout=10s": no endpoints available for service "spinnaker-operator"

@ichi0915
Copy link
Contributor

Hi @tirelibirefe, sorry for the delay, where you able to install spinnaker?

if not I recommend checking this guide
Install the Operator

or maybe try using the bash script in this repo to install it
Armory kustomize patches
the script deploy.sh deploys the operator and then spinnaker

IDK why it is giving you the error failed calling webhook, what version of k8s are you using maybe I can try to replicate the issue or we can talk in slack and get on a call to check this

@initisan
Copy link

Hi @ichi0915 we have a similar error failed calling webhook thrown when trying deploy armory/spinnaker-operator:1.3.0-rc.21, could you help to check
#276

@willzhang
Copy link

same error ,when install operator, maybe should wait some time ,then apply spinsvc

kubernetes v1.27.7
operator:v1.4.0
spinnaker: v1.32.2
OS: ubuntu 22.04

root@node40:~# sealos run registry.cn-shenzhen.aliyuncs.com/cnmirror/spinnaker-operator:v1.4.0 
2023-11-22T16:21:24 info start to install app in this cluster
2023-11-22T16:21:24 info Executing SyncStatusAndCheck Pipeline in InstallProcessor
2023-11-22T16:21:24 info Executing ConfirmOverrideApps Pipeline in InstallProcessor
2023-11-22T16:21:24 info Executing PreProcess Pipeline in InstallProcessor
2023-11-22T16:21:24 info Executing pipeline MountRootfs in InstallProcessor.
2023-11-22T16:21:27 info Executing pipeline MirrorRegistry in InstallProcessor.
2023-11-22T16:21:27 info trying default http mode to sync images to hosts [192.168.72.40:22]
2023-11-22T16:23:35 info Executing UpgradeIfNeed Pipeline in InstallProcessor
customresourcedefinition.apiextensions.k8s.io/spinnakeraccounts.spinnaker.io created
customresourcedefinition.apiextensions.k8s.io/spinnakerservices.spinnaker.io created
customresourcedefinition.apiextensions.k8s.io/spinnakeraccounts.spinnaker.io condition met
customresourcedefinition.apiextensions.k8s.io/spinnakerservices.spinnaker.io condition met
deployment.apps/spinnaker-operator created
clusterrole.rbac.authorization.k8s.io/spinnaker-operator-role created
clusterrolebinding.rbac.authorization.k8s.io/spinnaker-operator-binding created
serviceaccount/spinnaker-operator created
Waiting for deployment "spinnaker-operator" rollout to finish: 0 out of 1 new replicas have been updated...
Waiting for deployment "spinnaker-operator" rollout to finish: 0 of 1 updated replicas are available...
deployment "spinnaker-operator" successfully rolled out
ingress.networking.k8s.io/spin-ingress created
Error from server (InternalError): error when creating "manifests/spinnakerservice.yml": Internal error occurred: failed calling webhook "webhook-spinnakerservices-v1alpha2.spinnaker.io": failed to call webhook: Post "https://spinnaker-operator.spinnaker-operator.svc:443/validate-spinnaker-io-v1alpha2-spinnakerservice?timeout=10s": context deadline exceeded
Error: exit status 1

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

No branches or pull requests

4 participants