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

Add allocation policy CRD and schema definition. #698

Merged
merged 1 commit into from
Apr 17, 2019

Conversation

pooneh-m
Copy link
Contributor

@pooneh-m pooneh-m commented Apr 9, 2019

Issue #597

CRDs are created using kubebuilder and updated to match the labels and conditions of the other CRDs.
install/yaml/install.yaml is generated by running 'make gen-install'

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 38eb0c69-85c7-4343-86e6-035b90c7ff1d

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 5a7fe69f-7035-43b2-93fb-8c3472237aea

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 2d2ca400-582f-4589-ad68-68ca98d7889d

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 817795e7-af16-4e15-9e73-63e83f5478ed

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 5001a9c9-97f4-4a4c-acc4-4a6ff7cb2da0

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: bdddb07a-22ad-4702-9393-e7c2627fd952

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: e151407c-4b74-462b-a908-7a4c5d3e5ab5

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: bcc1f102-4ee4-4441-a923-2edc283a9f93

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 86f515ce-c846-43a0-9715-7a71d3c18978

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 39ab4b41-8b6e-4e48-bf19-8b9b3d46dc3e

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-954bf25

type ClusterConnectionInfo struct {
ClusterName string `json:"clusterName"`
APIServerEndpoint string `json:"apiServerEndpoint"`
Namespace string `json:"namespace"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we can get rid of Namespace and AllocationServiceSecret if we just stored those as a "Secret". Here we can simply store the name of the secret.

If you look at what's stored in K8s service account token, it has ca.crt, namespace and secret already.

$ kubectl get secret -oyaml agones-sdk-token-n29lg
apiVersion: v1
data:
  ca.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURDekNDQWZPZ0F3SUJBZ0lRUEdGRUN1a1ZrbThzenM4SnRMUUFOekFOQmdrcWhraUc5dzBCQVFzRkFEQXYKTVMwd0t3WURWUVFERXlSak9HTmxZMkk0WWkwMFl6QmlMVFEzWWprdFltVmlaaTFtTURneU5UTmhZVGxpTjJRdwpIaGNOTVRrd01qSXdNakl3TmpJNVdoY05NalF3TWpFNU1qTXdOakk1V2pBdk1TMHdLd1lEVlFRREV5UmpPR05sClkySTRZaTAwWXpCaUxUUTNZamt0WW1WaVppMW1NRGd5TlROaFlUbGlOMlF3Z2dFaU1BMEdDU3FHU0liM0RRRUIKQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUUMyL3JKTm02d0hNRk9MMFFhQW5CUWw3b1B1YlR3elFqMTdNUWZmZHlhbwpDRk45RzFlRUhEZHRnSWlKY01SOGFPUCtRRm9Hb1lPL1ZmYXNOdm1kSE1ZRjRocnh1YkFOT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Secret
metadata:
  annotations:
    kubernetes.io/service-account.name: agones-sdk
    kubernetes.io/service-account.uid: 1c12d39b-3f69-11e9-936c-42010a8e00a8
  creationTimestamp: "2019-03-05T17:07:08Z"
  name: agones-sdk-token-n29lg
  namespace: default
  resourceVersion: "9036083"
  selfLink: /api/v1/namespaces/default/secrets/agones-sdk-token-n29lg
  uid: 1c14e7e8-3f69-11e9-8947-42010a8e0089
type: kubernetes.io/service-account-token

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point. Thanks @jkowalski.
Done.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: a2398aa5-2acb-4c26-8047-f7c366840ab5

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-bd6e7ea

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: b0eed39e-3f28-48b4-b0fd-0e48e89be394

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-1cb3fed

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 43dd1fce-f8a7-4e88-9715-e62340c70b8f

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-01ba472

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: a1277a58-f510-44c0-969c-658399a66531

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-006974a

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 593588d0-f508-496d-8c33-77394113b401

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-3463373

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 60f1f60d-ec45-46bd-984d-026ea0221407

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-c736ca9

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 3d06ead3-e919-4e81-b7e7-7808b228367d

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-9dc5d13

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 91b10098-f4d3-40b0-9fe0-a52c139cbf9b

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: b84f37bc-723e-485c-8f27-fc2188f9cc48

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-c8eae48

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 810c543e-3006-4d30-a20a-f1997151939a

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: bda20033-aca1-4be6-88d8-bfbad89caa4c

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're having a bad day with the flakes 😕 (hugo fell over on the last one! maybe time to upgrade)

I had only one thing that should be changed, everything else is an optional change.

pkg/apis/multicluster/v1alpha1/register.go Outdated Show resolved Hide resolved
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 923b6459-2cbf-4ee1-8c0d-246d87fbd9ee

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-1a466fd

type ClusterConnectionInfo struct {
ClusterName string `json:"clusterName"`
APIServerEndpoint string `json:"apiServerEndpoint"`
AllocationServiceSecret corev1.Secret `json:"allocationServiceSecret"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corev1.Secret is the entire body of the secret (including "metadata" and all the secret parts). I thought we'd just have the name of the secret here and load it when we need to connect.

@markmandel thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. "Putting it in a Secret object allows for more control over how it is used, and reduces the risk of accidental exposure.[1]"

[1] https://kubernetes.io/docs/concepts/configuration/secret/

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: adc23dc6-5ee8-4829-afc2-25ca10394aa3

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-47eddc2

@markmandel
Copy link
Member

Curious: should it be secretName rather than AllocationServiceSecretName ? Do we expect to have other secrets here?

Otherwise lgtm. Happy for you to merge if you feel strongly against the above 👍

@pooneh-m
Copy link
Contributor Author

Curious: should it be secretName rather than AllocationServiceSecretName ? Do we expect to have other secrets here?

Otherwise lgtm. Happy for you to merge if you feel strongly against the above

Changed the name. Thanks!

Using Secret from kubernetes/core for cluster connection

Adding the client generated code for allocation policy.

Setting the group name to multicluster.agones.dev
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 1599da74-672a-452c-88a2-549f9eb080ed

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 28ab1fb9-ca66-4eb3-95ca-beda91dead0d

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 2b4504b6-7d45-4554-905f-c7a64807c7bd

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 3ce41fe3-7dfe-4211-9f9b-6e4450a6e772

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-c6a39ba

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: fd5e9eb3-bd14-4e37-92bb-79bf74a0aae2

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/698/head:pr_698 && git checkout pr_698
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-c6a39ba

@markmandel markmandel merged commit 27b37f5 into googleforgames:master Apr 17, 2019
@markmandel markmandel added kind/feature New features for Agones area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc labels Apr 27, 2019
@markmandel markmandel added this to the 0.10.0 milestone Apr 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/feature New features for Agones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants