Skip to content

Commit

Permalink
Fix issues with codegen
Browse files Browse the repository at this point in the history
I noticed that codegen wasn't creating a generated folder, then
saw that I'd used the folder "client" instead of "generated".

Thanks to @stefanprodan for spotting some additional errors with
the codegen.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Mar 16, 2020
1 parent 3927047 commit 2f3018c
Show file tree
Hide file tree
Showing 37 changed files with 67 additions and 1,510 deletions.
6 changes: 3 additions & 3 deletions controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ func (c *Controller) syncHandler(key string) error {

if service != nil {
if service.Spec.Type == "LoadBalancer" {
tunnels := c.operatorclientset.InletsoperatorV1alpha1().
tunnels := c.operatorclientset.InletsV1alpha1().
Tunnels(service.ObjectMeta.Namespace)

ops := metav1.GetOptions{}
Expand Down Expand Up @@ -746,7 +746,7 @@ func (c *Controller) syncHandler(key string) error {
Namespace: deployment.Namespace,
}

_, updateErr := c.operatorclientset.InletsoperatorV1alpha1().
_, updateErr := c.operatorclientset.InletsV1alpha1().
Tunnels(tunnel.Namespace).
Update(tunnel)

Expand Down Expand Up @@ -892,7 +892,7 @@ func (c *Controller) updateTunnelProvisioningStatus(tunnel *inletsv1alpha1.Tunne
tunnelCopy.Status.HostID = id
tunnelCopy.Status.HostIP = ip

_, err := c.operatorclientset.InletsoperatorV1alpha1().Tunnels(tunnel.Namespace).Update(tunnelCopy)
_, err := c.operatorclientset.InletsV1alpha1().Tunnels(tunnel.Namespace).Update(tunnelCopy)
return err
}

Expand Down
4 changes: 2 additions & 2 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ echo ">> Temporary output directory ${TEMP_DIR}"
chmod +x ${CODEGEN_PKG}/generate-groups.sh

${CODEGEN_PKG}/generate-groups.sh all \
github.com/inlets/inlets-operator/pkg/client github.com/inlets/inlets-operator/pkg/apis \
github.com/inlets/inlets-operator/pkg/generated github.com/inlets/inlets-operator/pkg/apis \
inletsoperator:v1alpha1 \
--output-base "${TEMP_DIR}" \
--go-header-file ${SCRIPT_ROOT}/hack/boilerplate.go.txt

# Copy everything back.
cp -r "${TEMP_DIR}/github.com/inlets/inlets-operator/." "${SCRIPT_ROOT}/"
cp -r "${TEMP_DIR}/github.com/inlets/inlets-operator/." "${SCRIPT_ROOT}/"
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func main() {

controller := NewController(kubeClient, operatorClient,
kubeInformerFactory.Apps().V1().Deployments(),
tunnelsInformerFactory.Inletsoperator().V1alpha1().Tunnels(),
tunnelsInformerFactory.Inlets().V1alpha1().Tunnels(),
kubeInformerFactory.Core().V1().Services(),
infra)

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/inletsoperator/v1alpha1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

// +k8s:deepcopy-gen=package
// +groupName=inletsoperator.k8s.io
// +groupName=inlets.inlets.dev

// Package v1alpha1 is the v1alpha1 version of the API.
package v1alpha1
97 changes: 0 additions & 97 deletions pkg/client/clientset/versioned/clientset.go

This file was deleted.

20 changes: 0 additions & 20 deletions pkg/client/clientset/versioned/doc.go

This file was deleted.

82 changes: 0 additions & 82 deletions pkg/client/clientset/versioned/fake/clientset_generated.go

This file was deleted.

20 changes: 0 additions & 20 deletions pkg/client/clientset/versioned/fake/doc.go

This file was deleted.

56 changes: 0 additions & 56 deletions pkg/client/clientset/versioned/fake/register.go

This file was deleted.

20 changes: 0 additions & 20 deletions pkg/client/clientset/versioned/scheme/doc.go

This file was deleted.

Loading

0 comments on commit 2f3018c

Please sign in to comment.