Giter Site home page Giter Site logo

zoetrope / kubebuilder-training Goto Github PK

View Code? Open in Web Editor NEW
63.0 3.0 21.0 4.11 MB

つくって学ぶKubebuilder

Home Page: https://zoetrope.github.io/kubebuilder-training/

License: MIT License

Go 71.71% Dockerfile 3.45% Makefile 20.99% JavaScript 0.15% Handlebars 0.24% Starlark 3.46%

kubebuilder-training's Issues

Some suggestions

本書を読んでいるときにいくつか躓いたところがあるので書いておきます。必要ならばPR書くので言ってください。また、意図がくみ取れない場合は説明しますのでお問い合わせください。

  • kindも対応バージョン(あるいは筆者が実験した環境)があると地雷を踏みぬきにくくてよいと思う
  • CRDマニフェストの説明においてmake manifestsを実行していない
  • クライアントの使い方はクライアントの作り方についてのサンプルコードであってcontrollerのコードではないのだが、明にそう説明されていないので混乱する。
  • Reconcileの実装についての指摘
    • metricsパッケージが存在していない段階でこのパッケージを参照するコード(r.setMetrics(mdViewおよび r.removeMetrics(mdView))があるのでビルドが失敗する
    • EventRecorderを使っていない段階でこれを使っているコード(r.Recorder.Event(&mdView, corev1.EventTypeNormal, "Updated", fmt.Sprintf("MarkdownView(%s:%s) updated: %s", mdView.Namespace, mdView.Name, mdView.Status)))があるのでビルドが失敗する
  • その他Reconcileの実装についての指摘。本に張り付けられているソースさえ見れば実装できるのか、あるいはリンク先のコードを見るのが前提なのかわからなかったので上の項目とは分けている。後者だとしたらこれらは無用な指摘
    • corev1apps v1をimportせよという指示が無い
    • reconcileDeploymentのソースが貼り付けられていない
    • ownerRef()labelSet()について言及されていない
    • DockerfileCOPY pkg/ pkg/ を追加せよという指示が無い

Finalizerの名前

Fainalizerの節で例として書いてあるfainalizer(以下)は設定できないようです。

metadata:
  finalizers:
  - markdownview.finalizers.view.zoetrope.github.io

次のようなエラーではじかれました。

# configmaps "test" was not valid:
# * metadata.finalizers[0]: Invalid value: "markdownview.finalizers.view.zoetrope.github.io": name is neither a standard finalizer name nor is it fully qualified

/区切りじゃないとダメみたいですね。

https://github.com/kubernetes/kubernetes/blob/v1.24.3/pkg/apis/core/validation/validation.go#L5966-L5976
https://github.com/kubernetes/kubernetes/blob/v1.24.3/pkg/apis/core/helper/helpers.go#L293-L302

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.